Browse Source

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
0.15
MarcoFalke 7 years ago
parent
commit
ecd21357f1
No known key found for this signature in database
GPG Key ID: D2EA4850E7528B25
  1. 1
      src/bench/bench.cpp

1
src/bench/bench.cpp

@ -100,6 +100,7 @@ bool benchmark::State::KeepRunning()
int64_t averageCycles = (nowCycles-beginCycles)/count; int64_t averageCycles = (nowCycles-beginCycles)/count;
std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << "," std::cout << std::fixed << std::setprecision(15) << name << "," << count << "," << minTime << "," << maxTime << "," << average << ","
<< minCycles << "," << maxCycles << "," << averageCycles << "\n"; << minCycles << "," << maxCycles << "," << averageCycles << "\n";
std::cout.copyfmt(std::ios(nullptr));
return false; return false;
} }

Loading…
Cancel
Save