Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

iOS Application Benchmarking

What is the best and most efficient way to benchmark an iOS application? We are mainly looking to get response times for the application to communicate with our API and complete the processing of the returned data.

like image 902
Bot Avatar asked Jan 20 '12 15:01

Bot


2 Answers

If you're looking for API response times, you can simply add the two lines of code that measure the times within your app (log at request start, log at request end.)

You can also look into using Apple's Instruments toolset to measure device CPU performance and leaks.

For the quickset-and-dirtiest method of measuring your performance, just NSLog at the start of the request, end of the request/start of processing, and end of processing. That will give you an idea of whether your device or the server are causing a hold-up (something I assume you're looking for). Xcode will timestamp the outputs and you can analyze them after a few trials.

Also, if you run your app in the simulator, it will not give a good representation of phone speed, as it just runs at your computer's speed, but it will give you the option of using the new Network Link Conditioner in Lion to simulate slow and sketchy network connections, so you can see how the network performance would feel out in the field - just make sure to bear in mind you won't have the comfort of the extra processing power.

like image 118
Tim Avatar answered Sep 30 '22 00:09

Tim


Flurry provides decent, free analytics and support timed events. Take a look: http://www.flurry.com/product/analytics/index.html

This is good if you want to collect data from other folks running your app.

like image 28
picciano Avatar answered Sep 29 '22 23:09

picciano