summaryrefslogtreecommitdiffstats
path: root/libcxx/utils/google-benchmark/src/csv_reporter.cc
diff options
context:
space:
mode:
Diffstat (limited to 'libcxx/utils/google-benchmark/src/csv_reporter.cc')
-rw-r--r--libcxx/utils/google-benchmark/src/csv_reporter.cc20
1 files changed, 10 insertions, 10 deletions
diff --git a/libcxx/utils/google-benchmark/src/csv_reporter.cc b/libcxx/utils/google-benchmark/src/csv_reporter.cc
index 35510645b08..4a641909d80 100644
--- a/libcxx/utils/google-benchmark/src/csv_reporter.cc
+++ b/libcxx/utils/google-benchmark/src/csv_reporter.cc
@@ -22,9 +22,9 @@
#include <tuple>
#include <vector>
+#include "check.h"
#include "string_util.h"
#include "timers.h"
-#include "check.h"
// File format reference: http://edoceo.com/utilitas/csv-file-format.
@@ -42,7 +42,7 @@ bool CSVReporter::ReportContext(const Context& context) {
return true;
}
-void CSVReporter::ReportRuns(const std::vector<Run> & reports) {
+void CSVReporter::ReportRuns(const std::vector<Run>& reports) {
std::ostream& Out = GetOutputStream();
if (!printed_header_) {
@@ -58,7 +58,8 @@ void CSVReporter::ReportRuns(const std::vector<Run> & reports) {
Out << *B++;
if (B != elements.end()) Out << ",";
}
- for (auto B = user_counter_names_.begin(); B != user_counter_names_.end();) {
+ for (auto B = user_counter_names_.begin();
+ B != user_counter_names_.end();) {
Out << ",\"" << *B++ << "\"";
}
Out << "\n";
@@ -69,9 +70,9 @@ void CSVReporter::ReportRuns(const std::vector<Run> & reports) {
for (const auto& run : reports) {
for (const auto& cnt : run.counters) {
CHECK(user_counter_names_.find(cnt.first) != user_counter_names_.end())
- << "All counters must be present in each run. "
- << "Counter named \"" << cnt.first
- << "\" was not in a run after being added to the header";
+ << "All counters must be present in each run. "
+ << "Counter named \"" << cnt.first
+ << "\" was not in a run after being added to the header";
}
}
}
@@ -80,10 +81,9 @@ void CSVReporter::ReportRuns(const std::vector<Run> & reports) {
for (const auto& run : reports) {
PrintRunData(run);
}
-
}
-void CSVReporter::PrintRunData(const Run & run) {
+void CSVReporter::PrintRunData(const Run& run) {
std::ostream& Out = GetOutputStream();
// Field with embedded double-quote characters must be doubled and the field
@@ -135,9 +135,9 @@ void CSVReporter::PrintRunData(const Run & run) {
Out << ",,"; // for error_occurred and error_message
// Print user counters
- for (const auto &ucn : user_counter_names_) {
+ for (const auto& ucn : user_counter_names_) {
auto it = run.counters.find(ucn);
- if(it == run.counters.end()) {
+ if (it == run.counters.end()) {
Out << ",";
} else {
Out << "," << it->second;
OpenPOWER on IntegriCloud