Commit bdf4a5f4 by Dominic Hamon

Add reference to BENCHMARK_MAIN in README

parent f022d780
...@@ -27,17 +27,7 @@ static void BM_StringCopy(benchmark::State& state) { ...@@ -27,17 +27,7 @@ static void BM_StringCopy(benchmark::State& state) {
} }
BENCHMARK(BM_StringCopy); BENCHMARK(BM_StringCopy);
// Augment the main() program to invoke benchmarks if specified BENCHMARK_MAIN();
// via the --benchmarks command line flag. E.g.,
// my_unittest --benchmark_filter=all
// my_unittest --benchmark_filter=BM_StringCreation
// my_unittest --benchmark_filter=String
// my_unittest --benchmark_filter='Copy|Creation'
int main(int argc, const char* argv[]) {
benchmark::Initialize(&argc, argv);
benchmark::RunSpecifiedBenchmarks();
return 0;
}
``` ```
Sometimes a family of microbenchmarks can be implemented with Sometimes a family of microbenchmarks can be implemented with
......
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