aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcoFalke <falke.marco@gmail.com>2017-08-09 11:52:02 +0200
committerMarcoFalke <falke.marco@gmail.com>2017-08-09 11:52:19 +0200
commitecd21357f16106e541e9c2854ead2a906659b938 (patch)
treea23fd039713f387a73f818c0f9a361b684d06c79
parent4b5a7ce0c301ad971f383eb60f61bf9b4026efda (diff)
parentfd05132e5a5f34046536ef62ba8d130fa3b00c65 (diff)
Merge #10963: [bench] Restore format state of cout after printing with std::fixed/setprecision
fd05132e5 Restore default format state of cout after printing with std::fixed/setprecision (practicalswift) Pull request description: Restore default format state of `std::cout` after printing with `std::fixed`/`std::setprecision`. Tree-SHA512: 445b5b42aff58e2350939e8febc9b4a6fff478616abfe831aec42bee906cefac7a153c93d506407fb213d04dae9c7afbb5bfd344be63ca0f40ae39b331a4144f
-rw-r--r--src/bench/bench.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/bench/bench.cpp b/src/bench/bench.cpp
index 33631d2d15..f424572913 100644
--- a/src/bench/bench.cpp
+++ b/src/bench/bench.cpp
@@ -100,6 +100,7 @@ bool benchmark::State::KeepRunning()
int64_t averageCycles = (nowCycles-beginCycles)/count;
std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << ","
<< minCycles << "," << maxCycles << "," << averageCycles << "\n";
+ std::cout.copyfmt(std::ios(nullptr));
return false;
}