| 42 | } |
| 43 | |
| 44 | void Benchmark::writeLogFile(std::ofstream& log, uint32_t runNum, const QuerySummary& querySummary, |
| 45 | const std::vector<std::string>& actualOutput) const { |
| 46 | log << "Run Num: " << runNum << '\n'; |
| 47 | log << "Status: " << (compareResult && actualOutput != expectedOutput ? "error" : "pass") |
| 48 | << '\n'; |
| 49 | log << "Query: " << query << '\n'; |
| 50 | log << "Expected output: " << '\n'; |
| 51 | for (auto& result : expectedOutput) { |
| 52 | log << result << '\n'; |
| 53 | } |
| 54 | log << "Actual output: " << '\n'; |
| 55 | for (auto& result : actualOutput) { |
| 56 | log << result << '\n'; |
| 57 | } |
| 58 | log << "Compiling time: " << querySummary.getCompilingTime() << '\n'; |
| 59 | log << "Execution time: " << querySummary.getExecutionTime() << "\n\n"; |
| 60 | log.flush(); |
| 61 | log.close(); |
| 62 | } |
| 63 | |
| 64 | void Benchmark::log(uint32_t runNum, QueryResult& queryResult) const { |
| 65 | auto querySummary = queryResult.getQuerySummary(); |
nothing calls this directly
no test coverage detected