Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

Performance Tests

#1

The project uses a lot of memory and processor time on the iphone. Create performance tests to find and measure the bottle necks. Once this is complete, we can start improving them, and will have tests to measure our improvements.

Reported by Joshua Vickery · October 17th, 2008 @ 07:57 AM

State: new
Milestone: none
Assigned to: Joshua Vickery Joshua Vickery

Activity

  1. Joshua Vickery
    Joshua Vickery
    • Title changed from Performance Test to Performance Tests
    • Tag set to performance

    October 17th, 2008 @ 07:59 AM

  2. Joshua Vickery
    Joshua Vickery
    • State changed from new to resolved

    October 17th, 2008 @ 08:05 AM

  3. Joshua Vickery
    Joshua Vickery
    • State changed from resolved to new

    October 17th, 2008 @ 08:06 AM

  4. Ryan Daigle
    Ryan Daigle

    (from [96497c612664976907affa899aca7165cce7ded6]) [#1 Performance Tests] only log in debug mode http://github.com/yfactorial/obj...

    October 21st, 2008 @ 09:08 AM

  5. Joshua Vickery
    Joshua Vickery

    Test results with logging off:

    Test Suite '/Users/vickeryj/Code/active_resource/build/Debug-iphonesimulator/Unit Tests.app' started at 2008-10-21 09:09:57 -0400
    Test Suite 'SenTestCase' started at 2008-10-21 09:09:57 -0400
    Test Suite 'SenTestCase' finished at 2008-10-21 09:09:57 -0400.
    Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
    Test Suite 'GTMTestCase' started at 2008-10-21 09:09:57 -0400
    Test Suite 'GTMTestCase' finished at 2008-10-21 09:09:57 -0400.
    Executed 0 tests, with 0 failures (0 unexpected) in 0.000 (0.000) seconds
    Test Suite 'DogTest' started at 2008-10-21 09:09:57 -0400
    Test Case '-[DogTest testDogCount]' passed (0.245 seconds).
    Test Case '-[DogTest testDogDelete]' passed (0.549 seconds).
    Test Case '-[DogTest testDogProperties]' passed (0.000 seconds).
    Test Case '-[DogTest testDogSave]' passed (0.249 seconds).
    Test Case '-[DogTest testDogUpdate]' passed (0.239 seconds).
    Test Suite 'DogTest' finished at 2008-10-21 09:09:58 -0400.
    Executed 5 tests, with 0 failures (0 unexpected) in 1.283 (1.283) seconds
    Test Suite '/Users/vickeryj/Code/active_resource/build/Debug-iphonesimulator/Unit Tests.app' finished at 2008-10-21 09:09:58 -0400.
    Executed 5 tests, with 0 failures (0 unexpected) in 1.285 (1.285) seconds
    

    October 21st, 2008 @ 09:10 AM

  6. Joshua Vickery
    Joshua Vickery

    Test results on the iPhone with logging off:

    2008-10-21 09:15:03.969 Unit Tests[497:20b] Failed to load NSMainNibFile MainWindow.
    Test Suite '/var/mobile/Applications/B767C81C-089D-407F-8A54-62C4DB9303D2/Unit Tests.app' started at 2008-10-21 09:15:04 -0400
    Test Suite 'GTMTestCase' started at 2008-10-21 09:15:04 -0400
    Test Suite 'GTMTestCase' finished at 2008-10-21 09:15:04 -0400.
    Executed 0 tests, with 0 failures (0 unexpected) in 0.005 (0.005) seconds
    Test Suite 'DogTest' started at 2008-10-21 09:15:04 -0400
    Test Case '-[DogTest testDogCount]' passed (4.046 seconds).
    Test Case '-[DogTest testDogDelete]' passed (7.788 seconds).
    Test Case '-[DogTest testDogProperties]' passed (0.000 seconds).
    Test Case '-[DogTest testDogSave]' passed (3.932 seconds).
    Test Case '-[DogTest testDogUpdate]' passed (4.109 seconds).
    Test Suite 'DogTest' finished at 2008-10-21 09:15:23 -0400.
    Executed 5 tests, with 0 failures (0 unexpected) in 19.883 (19.883) seconds
    Test Suite 'SenTestCase' started at 2008-10-21 09:15:23 -0400
    Test Suite 'SenTestCase' finished at 2008-10-21 09:15:23 -0400.
    Executed 0 tests, with 0 failures (0 unexpected) in 0.005 (0.005) seconds
    Test Suite '/var/mobile/Applications/B767C81C-089D-407F-8A54-62C4DB9303D2/Unit Tests.app' finished at 2008-10-21 09:15:23 -0400.
    Executed 5 tests, with 0 failures (0 unexpected) in 19.916 (19.916) seconds
    

    October 21st, 2008 @ 09:16 AM

  7. Joshua Vickery
    Joshua Vickery

    Some numbers for JSON vs XML on the device using wifi

    JSON completes the test suit in around 25 seconds

    XML completes the test suite in around 34 seconds.

    Interestingly enough, looking at the Rails logs JSON seems to use a lot less rendering time than XML. It might be worth re-running these tests with libxml plugged into Rails:

    Completed in 0.07758 (12 reqs/sec) | Rendering: 0.06712 (86%) | DB: 0.00793 (10%) | 200 OK [http://macbook/dogs.xml?(null)]
    
    Completed in 0.04188 (23 reqs/sec) | Rendering: 0.02742 (65%) | DB: 0.01120 (26%) | 200 OK [http://macbook/dogs.json?(null)] 
    
    

    Still, the time difference suggests that there is a performance improvement elsewhere. Another variable to test with would be running the server through mod_deflat or the like.

    January 21st, 2009 @ 08:48 AM

  8. Ryan Daigle
    Ryan Daigle

    Could you use static xml/json files served via Apache for your tests to remove the Rails part from the equation?

    January 21st, 2009 @ 08:53 AM

  9. Joshua Vickery
    Joshua Vickery

    We surely could, and probably should, but knowing that XML is slower than JSON for Rails to produce & digest is probably also valuable.

    January 21st, 2009 @ 09:04 AM

Please Sign in or create a free account to add a new ticket.

With your very own profile, you can contribute to projects, track your activity, watch tickets, receive and update tickets through your email and much more.