| 62 | } |
| 63 | |
| 64 | void Benchmark::log(uint32_t runNum, QueryResult& queryResult) const { |
| 65 | auto querySummary = queryResult.getQuerySummary(); |
| 66 | auto actualOutput = testing::TestHelper::convertResultToString(queryResult); |
| 67 | spdlog::info("Run number: {}", // NOLINT(clang-analyzer-optin.cplusplus.UninitializedObject): |
| 68 | // spdlog has an unitialized object. |
| 69 | runNum); |
| 70 | spdlog::info("Compiling time {}", querySummary->getCompilingTime()); |
| 71 | spdlog::info("Execution time {}", querySummary->getExecutionTime()); |
| 72 | verify(actualOutput); |
| 73 | spdlog::info(""); |
| 74 | if (!config.outputPath.empty()) { |
| 75 | std::ofstream logFile(config.outputPath + "/" + name + "_log.txt", std::ios_base::app); |
| 76 | writeLogFile(logFile, runNum, *querySummary, actualOutput); |
| 77 | } |
| 78 | } |
| 79 | |
| 80 | void Benchmark::verify(const std::vector<std::string>& actualOutput) const { |
| 81 | if (actualOutput.size() == expectedNumTuples) { |
no test coverage detected