There are times when the use of instruments is impractical for measuring the performance of some Objective-C code.
Previously I mentioned an excellent guide on timing the performance of blocks and a library allowing you to easily profile the performance of a specific method.
Here’s a library allowing you to measure the performance of a specific section of code called MGBenchmark from Mattes Groeger.
With MGBenchmark you simply need to mark the start and finish of your code of the code you want to time, and it will time the execution until it reaches the marked finish even across classes.
Here’s a summary of features as stated in the readme:
– Measure total execution times
– Measure individual steps of execution
– Get the average execution time of all steps
– Have multiple benchmark sessions at the same time
– Implement custom output targets
You can find MGBenchmark on Github here.
A great library to help with improving the performance of your Objective-C code.
- How To Easily And Accurately Time Objective-C Blocks To See Which Code Performs Better
- Library Allowing You To Easily Chart An App’s Framerate In The Status Bar Area
- Easy To Use Objective-C Library For Profiling The Performance Of A Specific Method
- Tool Providing Easy To Understand Information On Objective-C Code Performance
- Best Resources In iOS Development – April 9th, 2012
Original article: Library Allowing You To Time The Performance Of A Definable Section Of Objective-C Code
©2013 iOS App Dev Libraries, Controls, Tutorials, Examples and Tools. All Rights Reserved.