google / google/benchmark

Support for minimum iteration count.

Open
#746 22 comments 14 reactions 0 assignees View on GitHub
enhancement
Dominant language
C++
Stars
10.4k
Forks
1.8k
Avg merge
2d 4h
Merged PRs (30d)
8

Description

At present, it is not possible to specify a minimum number of iterations for a benchmark. This is an issue when the framework decides that a given configuration for a benchmark should only be run a small number of times, fewer than we would like for the benchmark to be stable. The only way to modify the number of iterations is by explicitly specifying `Iterations(...)` for a given benchmark, or by passing `--benchmark_min_time=...` to run the benchmarks for a specific length of time.

One possible solution would be a corresponding `--benchmark_min_iterations=...` flag that could be passed at runtime, which would prevent the framework from running the benchmark for any fewer than `N` iterations, where `N` is some number by which we know that the result should be stable.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.