From 0633d3a07d2b7ba5a93494b2a32f1c0c1294fbf7 Mon Sep 17 00:00:00 2001 From: John Keiser Date: Wed, 2 Sep 2020 10:27:04 -0700 Subject: [PATCH] Make branch miss numbers integers --- benchmark/parse_records_benchmark.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/benchmark/parse_records_benchmark.h b/benchmark/parse_records_benchmark.h index 3affe17a..cc9712ee 100644 --- a/benchmark/parse_records_benchmark.h +++ b/benchmark/parse_records_benchmark.h @@ -35,11 +35,11 @@ template static void ParseRecordsBenchmark(benchmark::St state.SetItemsProcessed(bench.Records().size() * state.iterations()); auto counts = events.end(); if (events.has_events()) { - state.counters["Ins./Byte"] = double(counts.instructions()) / double(bytes); - state.counters["Ins./Cycle"] = double(counts.instructions()) / double(counts.cycles()); - state.counters["Cycles/Byte"] = double(counts.cycles()) / double(bytes); - state.counters["BranchMiss"] = benchmark::Counter(counts.branch_misses(), benchmark::Counter::kAvgIterations); - state.counters["CacheMiss"] = benchmark::Counter(counts.cache_misses(), benchmark::Counter::kAvgIterations); - state.counters["CacheRef"] = benchmark::Counter(counts.cache_references(), benchmark::Counter::kAvgIterations); + state.counters["Ins./Byte"] = counts.instructions() / double(bytes); + state.counters["Ins./Cycle"] = counts.instructions() / double(counts.cycles()); + state.counters["Cycles/Byte"] = counts.cycles() / double(bytes); + state.counters["BranchMiss"] = round(counts.branch_misses() / double(state.iterations())); + state.counters["CacheMiss"] = round(counts.cache_misses() / double(state.iterations())); + state.counters["CacheRef"] = round(counts.cache_references() / double(state.iterations())); } }