Skip to content

A small helper class to benchmark specific code parts at runtime

License

Notifications You must be signed in to change notification settings

e-sites/Bohrium

Repository files navigation

Bohrium

Bohrium

Bohrium is part of the E-sites iOS Suite.


A small helper class to benchmark specific code parts at runtime.

forthebadge forthebadge

Platform CocoaPods Compatible Travis-ci

Installation

Podfile:

pod 'Bohrium'

And then

pod install

Implementation

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")
   }
}

Would result into something like this:

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

About

A small helper class to benchmark specific code parts at runtime

Resources

License

Stars

Watchers

Forks

Packages

No packages published