We are using Google (micro) Benchmark (https://github.com/google/benchmark) to do benchmarking. When we display the results, the benchmark displays all headers (even unused ones). The benchmark results are displayed using csv_reporter (https://github.com/google/benchmark/blob/master/src/csv_reporter.cc). I see in the code (at line 71), that it iterates through all headers (elements, declaration at line 34) and just prints them out.
34 std::vector<std::string> elements = {
35 "name", "iterations", "real_time", "cpu_time",
36 "time_unit", "bytes_per_second", "items_per_second", "label",
37 "error_occurred", "error_message"};
38 }
...
71 for (auto B = elements.begin(); B != elements.end();) {
72 Out << *B++;
73 if (B != elements.end()) Out << ",";
74 }
I cannot find a way to disable the unused headers, and this way the benchmark does not look nice. This is how my benchmark result look right now:
name iterations real_time cpu_time time_unit bytes_per_second items_per_second label error_occurred error_message "CustomCounter1" "CustomCounter2"
"randomname" 1 1059.26 1062.5 ms
So as you can see, there are a lot of unused columns for no reason. However, I would like to keep the custom counters at the end, as these have data that I display, I just could not put it here in the markup.
Namely, I would like to remove these headers: bytes_per_second, items_per_second, label, error_occurred, error_message.