One way to perform such kind of performance testing is to use a simple iOS WebView app to load the pages and use the Instruments toolset (that comes with Xcode) to measure memory and response/load time.
Installing Instruments (comes with Xcode)
See https://mobpot.wordpress.com/2011/07/21/simulating-iphone-safari-browser/ for steps on installing Xcode. Once done, use Spotlight (ie. the “magnifying glass” icon on the top right hand corner of your Mac) to search for “Instruments”. Once activated, your screen should look like this:
Download and customize the WebView app
- Download the zip file from http://dblog.com.au/iphone-development/iphone-sdk-tutorial-build-your-very-own-web-browser/
- Unzip it
- Open the xcodeproj from Xcode
- The app was initially written for iOS 2.x so you’ll need to set the correct SDK version.
- To do this – Project->Edit Active Target “WebBrowserTutorial”. Base SDK – set to the latest eg. iOS 4.3
- On the “Simulator – 4.3 | Debug” tab on the top left hand corner of Xcode, set it to Simulator and iPhone Simulator
- Under “Classes” look for WebBrowserTutorialAppDelegate.m and the applicationDidFinishLaunching method
- Change the url to your desired URL
- Build & Run
Using Instruments to Perform Performance Testing
- Activate Instruments
- Under “iOS”, choose “Allocations” to see how memory is being allocated to the app, “Time Profiler” to see time used by various method calls, “Activity Monitor” to see system activity.
- Next select the target app by clicking on the “Target” drop down list on the top left hand of the Instruments screen. Then choose the target app. The target app is a .app file that resides in the “build” directory of the folder you unzipped it in. Check the build settings in Xcode to locate the app file. You may also need to change the settings to generate the app file.
- Click the record button ie. the one with the big red dot.
- You can then see the results displayed on the Instruments dashboard.