diff --git a/docs/user_guide.md b/docs/user_guide.md index 046d7dea8..315276277 100644 --- a/docs/user_guide.md +++ b/docs/user_guide.md @@ -1106,6 +1106,7 @@ void BM_spin_empty(benchmark::State& state) { } BENCHMARK(BM_spin_empty) + ->Repetitions(3) // or add option --benchmark_repetitions=3 ->ComputeStatistics("max", [](const std::vector& v) -> double { return *(std::max_element(std::begin(v), std::end(v))); }) @@ -1125,8 +1126,9 @@ void BM_spin_empty(benchmark::State& state) { } BENCHMARK(BM_spin_empty) + ->Repetitions(3) // or add option --benchmark_repetitions=3 ->ComputeStatistics("ratio", [](const std::vector& v) -> double { - return std::begin(v) / std::end(v); + return v.front() / v.back(); }, benchmark::StatisticUnit::kPercentage) ->Arg(512); ```