mirror of
https://github.com/google/benchmark.git
synced 2024-12-27 13:00:36 +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);
|
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
|
||||||
|
Loading…
Reference in New Issue
Block a user