Tomer Shiri’s NanoProfiler let’s you “measure a function’s runtime without adding a single line of code to the original function” (via ManiacDev). It’s implemented using TheWrapper, his library that uses the Objective-C runtime to add pre-run and post-run blocks to a method. I like the idea, though his method of calling the original
IMP does not seem correct for methods with different types of arguments and return values. At the moment, I can’t think of a fully reliable way to do that, though.
Stay up-to-date by subscribing to the Comments RSS Feed for this post.