Make warmup_time be configurable#1844
Make warmup_time be configurable#1844horenmar merged 1 commit intocatchorg:masterfrom khyperia:benchmarkWarmupTime
Conversation
| ( "perform only measurements; do not perform any analysis" ) | ||
| | Opt( config.benchmarkWarmupTime, "benchmarkWarmupTime" ) | ||
| ["--benchmark-warmup-time"] | ||
| ( "amount of time in milliseconds spent on warming up each test (default: 500)" ) |
There was a problem hiding this comment.
This does not track with the default in code.
| <pre>--benchmark-warmup-time</pre> | ||
|
|
||
| Configure the amount of time spent warming up each test. | ||
|
|
There was a problem hiding this comment.
This should get an "introduced in" placeholder.
|
I'll have proper look later this week, but two things jumped out to me. |
Codecov Report
@@ Coverage Diff @@
## master #1844 +/- ##
==========================================
- Coverage 86.27% 86.23% -0.03%
==========================================
Files 131 131
Lines 3888 3893 +5
==========================================
+ Hits 3354 3357 +3
- Misses 534 536 +2 |
|
Great! Also, the constant |
|
IIRC those are done only once, so they shouldn't cause a problem for users with a large numbers of benchmarks. Anyway, I fixed a missing ToC entry in docs and rebased the approvals, I'll merge it after CI passes. |
|
thanks so much! ❤️ |
There's a constant,
warmup_time, that is used for both timer statistics discovery, as well as test warmup. The timer statistics usage is fine, but, the default constant of 100ms used for each and every test warmup makes running a large number of benchmarks take an unreasonable amount of time (the project I'm working on has many very small/fast benchmarks).This PR makes that constant be configurable with a command line switch, instead of a
const.Thanks! ✨