[FR] Report max, min, avg time per iteration
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 1.8k
- Avg merge
- 2d 4h
- Merged PRs (30d)
- 8
Description
**Is your feature request related to a problem? Please describe.**
Currently there is no way to report max, min time per iteration. Once the benchmark is run you will get these metrics: "Time" , "CPU" , "Iterations".
In many scenarios you would love to know min and max beyond the average time to spot the outliers. Imaging that you decode video frames. You might want to know if there are video frames which took exceptionally longer than the other frames in your video.
While it's possible to set the number of repetitions > 1 and implement custom statistics to obtain min and max, there is no similar logic per iterations basis.
**Describe the solution you'd like**
Add some flag to report the metrics in this way:
"Average iteration time", "Minimum iteration time", "Maximum iteration time", "average iteration CPU" , "Iterations".
**Describe alternatives you've considered**
I've tried to repetitions > 1 and implemented custom statistics. However, it did not solve my problem. I would love to have max and min per iteration and not per repetition. I also tried the combination of manual timing and counters to imitate max and min, however that solution is not elegant.
**Additional context**
At the end, I ended up using a DYI benchmark and would love to add min/max per iteration to google/benchmark.
Contributor guide
Assessment
This issue has not been assessed yet.