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
This commit is contained in:
MarcoFalke 2017-08-09 11:52:02 +02:00
commit ecd21357f1
No known key found for this signature in database
GPG key ID: D2EA4850E7528B25

View file

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