Skip to content

Commit 6ecade8

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 3bd55d0 commit 6ecade8

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 during walltime runs in order to have
98+
// 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, 5);
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)