| 90 | } |
| 91 | |
| 92 | void BenchmarkRunner::profileQueryIfEnabled(Benchmark* benchmark) const { |
| 93 | if (config->enableProfile && !config->outputPath.empty()) { |
| 94 | auto profileInfo = benchmark->runWithProfile(); |
| 95 | std::ofstream profileFile(config->outputPath + "/" + benchmark->name + "_profile.txt", |
| 96 | std::ios_base::app); |
| 97 | profileFile << profileInfo->getNext()->toString() << '\n'; |
| 98 | profileFile.flush(); |
| 99 | profileFile.close(); |
| 100 | } |
| 101 | } |
| 102 | |
| 103 | } // namespace benchmark |
| 104 | } // namespace lbug |