poco/Data/SQLParser/benchmark/benchmark.cpp
Aleksandar Fabijanic ef688babc2
SQLParser not included in the release archive #4453 (#4456)
* fix(SQLParser): move to Data dir; add extradirs, remove vs 140,150 build scripts generation

* fix(ActiveRecord): Makefile #4453

* fix(Data): Make SQLParser internal

* fix(build): ODBC Makefile and Data libs CmakeLists #4453

* fix(build): Data libs CMakeLists #4453

* fix(build): regenerate VS projects #4453

* fix(CppUnit): remove Foundation dependency

* fix(SQLParser): remove leftover unnecessary includes

* fix(SQLParser): remove fwd header #4453

* fix(PocoDoc): remove SQLParser from include list

* fix(mkrelease): remove 140,150 vs projects

* fix(SQLParser): Disable SQL parsing by default #4462

* fix(test): Disable SQL parsing by default #4462

* Fix detection of odbc and apache2 for Fedora (#4461)

* Fixed transaction handling in MySQL test when SQL parser is switched off

* chore(ParallelSocketAcceptor): remove unnecessary include and using from header

---------

Co-authored-by: Matej Kenda <matejken@gmail.com>
Co-authored-by: topazus <77263945+topazus@users.noreply.github.com>
Co-authored-by: Friedrich Wilckens <frwilckens@gmail.com>
2024-02-16 09:33:14 +01:00

29 lines
1.1 KiB
C++

#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();
}