Commit fcf8860e by Dominic Hamon

Merge pull request #140 from eliben/fix-custom-arguments-return

Fix documentation comment in benchmark_api.h w.r.t CustomArguments
parents 63192525 1dd40c99
...@@ -90,8 +90,7 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10, 8<<10, 1, 512); ...@@ -90,8 +90,7 @@ BENCHMARK(BM_SetInsert)->RangePair(1<<10, 8<<10, 1, 512);
static void CustomArguments(benchmark::internal::Benchmark* b) { static void CustomArguments(benchmark::internal::Benchmark* b) {
for (int i = 0; i <= 10; ++i) for (int i = 0; i <= 10; ++i)
for (int j = 32; j <= 1024*1024; j *= 8) for (int j = 32; j <= 1024*1024; j *= 8)
b = b->ArgPair(i, j); b->ArgPair(i, j);
return b;
} }
BENCHMARK(BM_SetInsert)->Apply(CustomArguments); BENCHMARK(BM_SetInsert)->Apply(CustomArguments);
......
...@@ -15,4 +15,12 @@ BENCHMARK(BM_basic)->UseRealTime(); ...@@ -15,4 +15,12 @@ BENCHMARK(BM_basic)->UseRealTime();
BENCHMARK(BM_basic)->ThreadRange(2, 4); BENCHMARK(BM_basic)->ThreadRange(2, 4);
BENCHMARK(BM_basic)->ThreadPerCpu(); BENCHMARK(BM_basic)->ThreadPerCpu();
void CustomArgs(benchmark::internal::Benchmark* b) {
for (int i = 0; i < 10; ++i) {
b->Arg(i);
}
}
BENCHMARK(BM_basic)->Apply(CustomArgs);
BENCHMARK_MAIN() BENCHMARK_MAIN()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment