博姆 4.2.3

博姆 4.2.3

Bas van Kuijck维护。



博姆 4.2.3

  • Bas van Kuijck

博姆

Bohrium

博姆是E-sites iOS Suite的一部分。


一个小助手类,用于在运行时实时评估特定代码段。

forthebadge forthebadge

Platform CocoaPods Compatible Travis-ci

安装

Podfile

pod 'Bohrium'

然后

pod install

实现

import Bohrium

let timer = Bohrium.Timer(name: "APIRequest")

Alamofire.request("https://httpbin.org/get").responseJSON { response in
   timer.tick("Response received")
   
   YourSpecialParser.parse(response) { result in
   	   timer.stop("Parser finished")
   }
}

将会得到类似以下内容

[Bohrium] 🔫 Start 'APIRequest' 
[Bohrium] ⏱ 'APIRequest' at 1.036: "Response received" (+ 1.036)
[Bohrium] 🏁 'APIRequest' at 2.346: "Parser finished" (+ 1.309)