Home:ALL Converter>performance testing - test:profile vs test:benchmark, wall time vs process time

performance testing - test:profile vs test:benchmark, wall time vs process time

Ask Time:2011-01-12T13:21:49         Author:joshs

Json Formatter

I am new to performance testing on rails. Can somebody explain the difference between wall time and process time? More importantly what is the difference between the time results that come from test:benchmark and test:profile. There is clearly a major difference, which I haven't gleaned from the docs. A few facts:

When I run rake test:benchmark, I get:

EditorTest#test_augment_large_doc (618 ms warmup)
           wall_time: 554 ms
              memory: 0.00 KB
             objects: 0
             gc_runs: 0
             gc_time: 0.00 ms

When I run rake test:profile, I get:

EditorTest#test_augment_large_doc (617 ms warmup)
        process_time: 1.74 sec
              memory: unsupported
             objects: unsupported

I have read:

... but I still don't understand the fundamental difference between these types of performance tests and why the times differ so much.

A couple more things: when I tail my development log, I get a time typically a bit higher (.1 secs) than the wall time from test:benchmark. And, when I look at XHR request times in firebug or chrome, I get a time typically .3 secs higher.

Thanks in advance!

[edit]

hmmm... no responses. Any comments? Is this a tool rails developers frequently use? Is the difference irrelevant for the optimization process?

Author:joshs,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/4665591/performance-testing-testprofile-vs-testbenchmark-wall-time-vs-process-time
yy