diff --git a/tests/benchmark/CMakeLists.txt b/tests/benchmark/CMakeLists.txt index 15b7c222f..aff42fe42 100644 --- a/tests/benchmark/CMakeLists.txt +++ b/tests/benchmark/CMakeLists.txt @@ -36,9 +36,6 @@ target_link_libraries(${test_prefix}map_concurrent mg-single-node kvstore_dummy_ add_benchmark(data_structures/ring_buffer.cpp) target_link_libraries(${test_prefix}ring_buffer mg-single-node kvstore_dummy_lib) -add_benchmark(query/eval.cpp) -target_link_libraries(${test_prefix}eval mg-single-node kvstore_dummy_lib) - add_benchmark(query/planner.cpp) target_link_libraries(${test_prefix}planner mg-single-node kvstore_dummy_lib) diff --git a/tests/benchmark/query/eval.cpp b/tests/benchmark/query/eval.cpp deleted file mode 100644 index 90733a58b..000000000 --- a/tests/benchmark/query/eval.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include - -#include "query/frontend/ast/ast.hpp" -#include "query/interpret/eval.hpp" - -static void BenchmarkCoalesceCallWithNulls(benchmark::State &state) { - int64_t num_args = state.range(0); - query::AstStorage ast_storage; - std::vector arguments; - arguments.reserve(num_args); - for (int64_t i = 0; i < num_args; ++i) { - arguments.emplace_back( - ast_storage.Create(query::TypedValue::Null)); - } - auto *function = ast_storage.Create("COALESCE", arguments); - query::Frame frame(0); - database::GraphDbAccessor *dba = nullptr; - query::Context context(*dba); - query::ExpressionEvaluator evaluator( - &frame, context.symbol_table_, context.evaluation_context_, - &context.db_accessor_, query::GraphView::OLD); - while (state.KeepRunning()) { - function->Accept(evaluator); - } -} - -static void BenchmarkCoalesceCallWithStrings(benchmark::State &state) { - int64_t num_args = state.range(0); - query::AstStorage ast_storage; - std::vector arguments; - arguments.reserve(num_args); - for (int64_t i = 0; i < num_args; ++i) { - std::string val = "some_string " + std::to_string(i); - arguments.emplace_back(ast_storage.Create(val)); - } - auto *function = ast_storage.Create("COALESCE", arguments); - query::Frame frame(0); - database::GraphDbAccessor *dba = nullptr; - query::Context context(*dba); - query::ExpressionEvaluator evaluator( - &frame, context.symbol_table_, context.evaluation_context_, - &context.db_accessor_, query::GraphView::OLD); - while (state.KeepRunning()) { - function->Accept(evaluator); - } -} - -// We are interested in benchmarking the usual amount of arguments -BENCHMARK(BenchmarkCoalesceCallWithNulls) - ->RangeMultiplier(2) - ->Range(1, 256) - ->ThreadRange(1, 16); - -BENCHMARK(BenchmarkCoalesceCallWithStrings) - ->RangeMultiplier(2) - ->Range(1, 256) - ->ThreadRange(1, 16); - -BENCHMARK_MAIN();