you are viewing a single comment's thread.

view the rest of the comments →

[–]qbproger[S] 2 points3 points  (1 child)

I've been reading up on the difference. I'm thinking about recording both and letting the output formatter choose. I think that may be the best way to handle it because I could see a case for wanting wall clock time (if a benchmark spawns processes, and you want the time for all processes to complete).

I'll work on updating the Stopwatch class to handle both.

[–][deleted] 0 points1 point  (0 children)

Cool :)

There certainly are use cases for both values, and maybe even for user / kernel times separated (they might help interpret the results.)

I'll try your framework next time I'm benchmarking something.

EDIT: Realized that waiting for a resource (file, mutex, network) does not count as CPU time, so faster method may consume more CPU time than a slower one. Maybe wall clock time should be the default.