mirror of
https://github.com/google/benchmark.git
synced 2024-12-26 20:40:21 +08:00
Add reference to BENCHMARK_MAIN in README
This commit is contained in:
parent
f022d780eb
commit
bdf4a5f4d2
12
README.md
12
README.md
@ -27,17 +27,7 @@ static void BM_StringCopy(benchmark::State& state) {
|
||||
}
|
||||
BENCHMARK(BM_StringCopy);
|
||||
|
||||
// Augment the main() program to invoke benchmarks if specified
|
||||
// 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;
|
||||
}
|
||||
BENCHMARK_MAIN();
|
||||
```
|
||||
|
||||
Sometimes a family of microbenchmarks can be implemented with
|
||||
|
Loading…
Reference in New Issue
Block a user