MCPcopy Create free account
hub / github.com/LadybugDB/ladybug / writeLogFile

Method writeLogFile

tools/benchmark/benchmark.cpp:44–62  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

42}
43
44void 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
64void Benchmark::log(uint32_t runNum, QueryResult& queryResult) const {
65 auto querySummary = queryResult.getQuerySummary();

Callers

nothing calls this directly

Calls 4

getCompilingTimeMethod · 0.80
getExecutionTimeMethod · 0.45
flushMethod · 0.45
closeMethod · 0.45

Tested by

no test coverage detected