mirror of
https://github.com/pocoproject/poco.git
synced 2025-10-26 10:32:56 +01:00
fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation
This commit is contained in:
28
Data/SQLParser/benchmark/benchmark.cpp
Normal file
28
Data/SQLParser/benchmark/benchmark.cpp
Normal file
@@ -0,0 +1,28 @@
|
||||
#include "benchmark/benchmark.h"
|
||||
|
||||
#include "benchmark_utils.h"
|
||||
#include "queries.h"
|
||||
|
||||
int main(int argc, char** argv) {
|
||||
// Create parse and tokenize benchmarks for TPC-H queries.
|
||||
const auto tpch_queries = getTPCHQueries();
|
||||
for (const auto& query : tpch_queries) {
|
||||
std::string p_name = query.first + "-parse";
|
||||
benchmark::RegisterBenchmark(p_name.c_str(), &BM_ParseBenchmark, query.second);
|
||||
std::string t_name = query.first + "-tokenize";
|
||||
benchmark::RegisterBenchmark(t_name.c_str(), &BM_TokenizeBenchmark, query.second);
|
||||
}
|
||||
|
||||
// Create parse and tokenize benchmarks for all queries in sql_queries array.
|
||||
for (unsigned i = 0; i < sql_queries.size(); ++i) {
|
||||
const auto& query = sql_queries[i];
|
||||
std::string p_name = getQueryName(i) + "-parse";
|
||||
benchmark::RegisterBenchmark(p_name.c_str(), &BM_ParseBenchmark, query.second);
|
||||
|
||||
std::string t_name = getQueryName(i) + "-tokenize";
|
||||
benchmark::RegisterBenchmark(t_name.c_str(), &BM_TokenizeBenchmark, query.second);
|
||||
}
|
||||
|
||||
benchmark::Initialize(&argc, argv);
|
||||
benchmark::RunSpecifiedBenchmarks();
|
||||
}
|
||||
Reference in New Issue
Block a user