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

Method log

tools/benchmark/benchmark.cpp:64–78  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

62}
63
64void 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
80void Benchmark::verify(const std::vector<std::string>& actualOutput) const {
81 if (actualOutput.size() == expectedNumTuples) {

Callers 1

runBenchmarkMethod · 0.80

Calls 4

getQuerySummaryMethod · 0.80
getCompilingTimeMethod · 0.80
getExecutionTimeMethod · 0.45
emptyMethod · 0.45

Tested by

no test coverage detected