Skip to content

Commit

Permalink
Specify units of measurement for benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
Marat Dukhan committed Dec 19, 2017
1 parent cc44bf3 commit aeba38b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions bench/get-current.cc
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ static void cpuinfo_get_current_processor(benchmark::State& state) {
benchmark::DoNotOptimize(current_processor);
}
}
BENCHMARK(cpuinfo_get_current_processor);
BENCHMARK(cpuinfo_get_current_processor)->Unit(benchmark::kNanosecond);

static void cpuinfo_get_current_core(benchmark::State& state) {
cpuinfo_initialize();
Expand All @@ -19,6 +19,6 @@ static void cpuinfo_get_current_core(benchmark::State& state) {
benchmark::DoNotOptimize(current_core);
}
}
BENCHMARK(cpuinfo_get_current_core);
BENCHMARK(cpuinfo_get_current_core)->Unit(benchmark::kNanosecond);

BENCHMARK_MAIN();
2 changes: 1 addition & 1 deletion bench/init.cc
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,6 @@ static void cpuinfo_initialize(benchmark::State& state) {
cpuinfo_initialize();
}
}
BENCHMARK(cpuinfo_initialize)->Iterations(1);
BENCHMARK(cpuinfo_initialize)->Iterations(1)->Unit(benchmark::kMillisecond);

BENCHMARK_MAIN();

0 comments on commit aeba38b

Please sign in to comment.