Measure a function's runtime without adding a single line of code to the original function. Nothing more.
Objective-C
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
TheWrapper @ b070d80
src
.gitmodules
README.md

README.md

NanoProfiler

Measure a function's runtime without adding a single line of code to the original function. Nothing more. Use it when you need to know how long it takes to a function to run, but you don't want to use heavy tools like instruments.

Usage

//MyClass.m

#import "NanoProfiler.h"

+(void) initialize {
  AddProfiler([MyClass class], @selector(foo));
}

-(void) foo {
...
}

Running [self foo] will print:

*** Timer MyClass_foo started. ***
*** Timer MyClass_foo stopped. runtime: 1.633041 milliseconds ***

NanoPrfiler is using TheWrapper. Check it out!