Log performance aggregates as logger messages

This commit is contained in:
Thomas Krijnen
2022-01-09 14:31:13 +01:00
parent c917881a8e
commit 7efd9cea2a
+2 -5
View File
@@ -227,11 +227,8 @@ void Logger::PrintPerformanceStats() {
}
for (auto& p : items) {
if (log2) {
(*log2) << p.second << std::string(max_size - p.second.size(), ' ') << ": " << p.first << std::endl;
} else if (wlog2) {
(*wlog2) << p.second.c_str() << std::string(max_size - p.second.size(), ' ').c_str() << ": " << p.first << std::endl;
}
auto s = p.second + std::string(max_size - p.second.size(), ' ') + ": " + std::to_string(p.first);
Message(LOG_PERF, s);
}
}