File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -25,8 +25,14 @@ else()
2525 add_definitions (-DDUCKDB_ROOT_DIRECTORY= "${PROJECT_SOURCE_DIR } " )
2626endif ()
2727
28- add_executable (benchmark_runner benchmark_runner.cpp interpreted_benchmark.cpp
29- ${BENCHMARK_OBJECT_FILES} )
28+ add_executable (
29+ benchmark_runner
30+ benchmark_runner.cpp interpreted_benchmark.cpp
31+ $<TARGET_OBJECTS :test_debug_fs_extension > ${BENCHMARK_OBJECT_FILES} )
32+
33+ target_include_directories (
34+ benchmark_runner
35+ PRIVATE ${PROJECT_SOURCE_DIR } /test/extension/debug_fs/include )
3036
3137target_link_libraries (benchmark_runner duckdb_static imdb test_helpers )
3238link_extension_libraries (benchmark_runner "" )
Original file line number Diff line number Diff line change 1212#include " duckdb/execution/operator/helper/physical_result_collector.hpp"
1313#include " duckdb/common/arrow/physical_arrow_collector.hpp"
1414#include " duckdb/parser/keyword_helper.hpp"
15+ #include " debug_fs_extension.hpp"
1516
1617#include < fstream>
1718#include < sstream>
@@ -47,6 +48,9 @@ struct InterpretedBenchmarkState : public BenchmarkState {
4748 explicit InterpretedBenchmarkState (string path, const string &version)
4849 : benchmark_config(GetBenchmarkConfig(version)),
4950 db(path.empty() ? nullptr : path.c_str(), benchmark_config.get()), con(db) {
51+ // ! Statically load the debug_fs extension so benchmarks can inject artificial I/O latency
52+ // ! (e.g. SET GLOBAL debug_fs_delay_mean_ms=...), mirroring how the unittest runner loads it.
53+ db.LoadStaticExtension <DebugFsExtension>();
5054 auto &instance = BenchmarkRunner::GetInstance ();
5155 auto res = con.Query (" PRAGMA threads=" + to_string (instance.threads ));
5256 D_ASSERT (!res->HasError ());
You can’t perform that action at this time.
0 commit comments