| 31 | } |
| 32 | |
| 33 | void BenchmarkRunner::runAllBenchmarks() { |
| 34 | for (auto& benchmark : benchmarks) { |
| 35 | try { |
| 36 | runBenchmark( // NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject): spdlog has |
| 37 | // an unitialized object. |
| 38 | benchmark.get()); |
| 39 | } catch (std::exception& e) { |
| 40 | spdlog::error("Error encountered while running benchmark {}: {}.", benchmark->name, |
| 41 | e.what()); |
| 42 | } |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | void BenchmarkRunner::registerBenchmark(const std::string& path) { |
| 47 | if (path.ends_with(BENCHMARK_SUFFIX)) { |