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

Method loadBenchmark

tools/benchmark/benchmark.cpp:22–34  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

20}
21
22void Benchmark::loadBenchmark(const std::string& benchmarkPath) {
23 BenchmarkParser parser;
24 const auto parsedBenchmarks = parser.parseBenchmarkFile(benchmarkPath);
25 DASSERT(parsedBenchmarks.size() == 1);
26 const auto queryConfig = parsedBenchmarks[0].get();
27 preRun = queryConfig->preRun;
28 query = queryConfig->query;
29 postRun = queryConfig->postRun;
30 name = queryConfig->name;
31 expectedOutput = queryConfig->expectedTuples;
32 compareResult = queryConfig->compareResult;
33 expectedNumTuples = queryConfig->expectedNumTuples;
34}
35
36std::unique_ptr<QueryResult> Benchmark::run() const {
37 return conn->query(query);

Callers

nothing calls this directly

Calls 3

parseBenchmarkFileMethod · 0.80
sizeMethod · 0.45
getMethod · 0.45

Tested by

no test coverage detected