Allow different counter sets in CSV reporting.

This commit is contained in:
Joao Paulo Magalhaes 2017-05-02 22:10:08 +01:00
parent 3db6254c39
commit ea019f3cd8
1 changed files with 6 additions and 2 deletions

View File

@ -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';
}