| 4 | #include "queries.h" |
| 5 | |
| 6 | int main(int argc, char** argv) { |
| 7 | // Create parse and tokenize benchmarks for TPC-H queries. |
| 8 | const auto tpch_queries = getTPCHQueries(); |
| 9 | for (const auto& query : tpch_queries) { |
| 10 | std::string p_name = query.first + "-parse"; |
| 11 | benchmark::RegisterBenchmark(p_name.c_str(), &BM_ParseBenchmark, query.second); |
| 12 | std::string t_name = query.first + "-tokenize"; |
| 13 | benchmark::RegisterBenchmark(t_name.c_str(), &BM_TokenizeBenchmark, query.second); |
| 14 | } |
| 15 | |
| 16 | // Create parse and tokenize benchmarks for all queries in sql_queries array. |
| 17 | for (unsigned i = 0; i < sql_queries.size(); ++i) { |
| 18 | const auto& query = sql_queries[i]; |
| 19 | std::string p_name = getQueryName(i) + "-parse"; |
| 20 | benchmark::RegisterBenchmark(p_name.c_str(), &BM_ParseBenchmark, query.second); |
| 21 | |
| 22 | std::string t_name = getQueryName(i) + "-tokenize"; |
| 23 | benchmark::RegisterBenchmark(t_name.c_str(), &BM_TokenizeBenchmark, query.second); |
| 24 | } |
| 25 | |
| 26 | benchmark::Initialize(&argc, argv); |
| 27 | benchmark::RunSpecifiedBenchmarks(); |
| 28 | } |
nothing calls this directly
no test coverage detected