diff options
Diffstat (limited to 'test/user_counters_tabular_test.cc')
-rw-r--r-- | test/user_counters_tabular_test.cc | 30 |
1 files changed, 15 insertions, 15 deletions
diff --git a/test/user_counters_tabular_test.cc b/test/user_counters_tabular_test.cc index 5fc5b4d..9b8a613 100644 --- a/test/user_counters_tabular_test.cc +++ b/test/user_counters_tabular_test.cc @@ -54,7 +54,7 @@ ADD_CASES(TC_CSVOut, {{"%csv_header," // ========================================================================= // void BM_Counters_Tabular(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } namespace bm = benchmark; state.counters.insert({ @@ -69,8 +69,8 @@ void BM_Counters_Tabular(benchmark::State& state) { BENCHMARK(BM_Counters_Tabular)->ThreadRange(1, 16); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_Counters_Tabular/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, - {"\"real_time\": %int,$", MR_Next}, - {"\"cpu_time\": %int,$", MR_Next}, + {"\"real_time\": %float,$", MR_Next}, + {"\"cpu_time\": %float,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"Bar\": %float,$", MR_Next}, {"\"Bat\": %float,$", MR_Next}, @@ -98,7 +98,7 @@ CHECK_BENCHMARK_RESULTS("BM_Counters_Tabular/threads:%int", &CheckTabular); // ========================================================================= // void BM_CounterRates_Tabular(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } namespace bm = benchmark; state.counters.insert({ @@ -113,8 +113,8 @@ void BM_CounterRates_Tabular(benchmark::State& state) { BENCHMARK(BM_CounterRates_Tabular)->ThreadRange(1, 16); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_CounterRates_Tabular/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, - {"\"real_time\": %int,$", MR_Next}, - {"\"cpu_time\": %int,$", MR_Next}, + {"\"real_time\": %float,$", MR_Next}, + {"\"cpu_time\": %float,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"Bar\": %float,$", MR_Next}, {"\"Bat\": %float,$", MR_Next}, @@ -145,7 +145,7 @@ CHECK_BENCHMARK_RESULTS("BM_CounterRates_Tabular/threads:%int", // set only some of the counters void BM_CounterSet0_Tabular(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } namespace bm = benchmark; state.counters.insert({ @@ -157,8 +157,8 @@ void BM_CounterSet0_Tabular(benchmark::State& state) { BENCHMARK(BM_CounterSet0_Tabular)->ThreadRange(1, 16); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_CounterSet0_Tabular/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, - {"\"real_time\": %int,$", MR_Next}, - {"\"cpu_time\": %int,$", MR_Next}, + {"\"real_time\": %float,$", MR_Next}, + {"\"cpu_time\": %float,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"Bar\": %float,$", MR_Next}, {"\"Baz\": %float,$", MR_Next}, @@ -177,7 +177,7 @@ CHECK_BENCHMARK_RESULTS("BM_CounterSet0_Tabular", &CheckSet0); // again. void BM_CounterSet1_Tabular(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } namespace bm = benchmark; state.counters.insert({ @@ -189,8 +189,8 @@ void BM_CounterSet1_Tabular(benchmark::State& state) { BENCHMARK(BM_CounterSet1_Tabular)->ThreadRange(1, 16); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_CounterSet1_Tabular/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, - {"\"real_time\": %int,$", MR_Next}, - {"\"cpu_time\": %int,$", MR_Next}, + {"\"real_time\": %float,$", MR_Next}, + {"\"cpu_time\": %float,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"Bar\": %float,$", MR_Next}, {"\"Baz\": %float,$", MR_Next}, @@ -213,7 +213,7 @@ CHECK_BENCHMARK_RESULTS("BM_CounterSet1_Tabular/threads:%int", &CheckSet1); // set only some of the counters, different set now. void BM_CounterSet2_Tabular(benchmark::State& state) { - while (state.KeepRunning()) { + for (auto _ : state) { } namespace bm = benchmark; state.counters.insert({ @@ -225,8 +225,8 @@ void BM_CounterSet2_Tabular(benchmark::State& state) { BENCHMARK(BM_CounterSet2_Tabular)->ThreadRange(1, 16); ADD_CASES(TC_JSONOut, {{"\"name\": \"BM_CounterSet2_Tabular/threads:%int\",$"}, {"\"iterations\": %int,$", MR_Next}, - {"\"real_time\": %int,$", MR_Next}, - {"\"cpu_time\": %int,$", MR_Next}, + {"\"real_time\": %float,$", MR_Next}, + {"\"cpu_time\": %float,$", MR_Next}, {"\"time_unit\": \"ns\",$", MR_Next}, {"\"Bat\": %float,$", MR_Next}, {"\"Baz\": %float,$", MR_Next}, |