mirror of https://github.com/google/benchmark.git
Allow different counter sets in CSV reporting.
This commit is contained in:
parent
3db6254c39
commit
ea019f3cd8
|
@ -137,8 +137,12 @@ void CSVReporter::PrintRunData(const Run & run) {
|
|||
// Print user counters
|
||||
for (const auto &ucn : user_counter_names_) {
|
||||
auto it = run.counters.find(ucn);
|
||||
CHECK(it != run.counters.end());
|
||||
Out << "," << it->second;
|
||||
if(it == run.counters.end()) {
|
||||
Out << ",";
|
||||
}
|
||||
else {
|
||||
Out << "," << it->second;
|
||||
}
|
||||
}
|
||||
Out << '\n';
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue