diff options
author | Andrea Canciani <ranma42@gmail.com> | 2010-08-09 18:47:13 +0200 |
---|---|---|
committer | Andrea Canciani <ranma42@gmail.com> | 2010-08-09 19:19:04 +0200 |
commit | 766832364904dbf5b8a67ebc1600d2ec45d2734f (patch) | |
tree | ea753e4ad2e9c6833e6f93839558efbcf46fe3f4 /util/show-events.c | |
parent | 046b642db0782ab5e2a5c82988b21e05afe8e716 (diff) |
perf: Improve calibration
Make the loops count depend on the actual calibration_loops/calibration_time
instead of calibration_loops/calibration_max_time.
This avoids having some tests take much less/more than the wanted time per iteration
(I was having some tests taking about 1 second, other taking about 7 seconds when
the ms_per_iteration was 2000)
Spend 0.5-1 times the time wanted for each iteration in calibration, increase the
accuracy of loops count. Just making the loops count be the correct ratio doesn't
guarantee that the iteration time is accurate. By actually measuring iteration
times until it gets greater than 1/4 of the wanted time, the total sum is bound
to be <= the wanted iteration time and last calibration time is between 1/4 and
1/2 of the wanted time, so it should give a very accurate loop count.
Diffstat (limited to 'util/show-events.c')
0 files changed, 0 insertions, 0 deletions