Skip to content

Commit 138cba4

Browse files
feat(google_benchmark): increase default codspeed walltime repetitions
This allows codspeed to have more rounds and improves default statistics, which would just be computed as 1 single element in the boxplot since we only have access to round times.
1 parent 36b0eeb commit 138cba4

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

google_benchmark/src/benchmark.cc

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,14 @@ BM_DEFINE_double(benchmark_min_warmup_time, 0.0);
9494

9595
// The number of runs of each benchmark. If greater than 1, the mean and
9696
// standard deviation of the runs will be reported.
97+
// CODSPEED: change default repetitions to 10 during walltime runs in order to
98+
// have better statistics by default
99+
// https://github.com/google/benchmark/blob/main/docs/user_guide.md#reporting-statistics
100+
#ifdef CODSPEED_WALLTIME
101+
BM_DEFINE_int32(benchmark_repetitions, 10);
102+
#else
97103
BM_DEFINE_int32(benchmark_repetitions, 1);
104+
#endif
98105

99106
// If enabled, forces each benchmark to execute exactly one iteration and one
100107
// repetition, bypassing any configured

0 commit comments

Comments
 (0)