Initialize Caladan runtime in B-link tree benchmark.

This commit is contained in:
Michael Mueller
2024-07-23 17:25:26 +02:00
parent f3debbbd70
commit 3717ee5ce4

View File

@@ -7,6 +7,9 @@
#include <mx/util/core_set.h> #include <mx/util/core_set.h>
#include <tuple> #include <tuple>
#define SHENANGO
#include <cc/runtime.h>
using namespace application::blinktree_benchmark; using namespace application::blinktree_benchmark;
/** /**
@@ -33,21 +36,23 @@ int main(int count_arguments, char **arguments)
std::cout << "[Warn] NUMA balancing may be enabled, set '/proc/sys/kernel/numa_balancing' to '0'" << std::endl; std::cout << "[Warn] NUMA balancing may be enabled, set '/proc/sys/kernel/numa_balancing' to '0'" << std::endl;
} }
auto [benchmark, prefetch_distance, use_system_allocator] = create_benchmark(count_arguments, arguments); rt::RuntimeInit("blinktree.cfg", [count_arguments, arguments] {
if (benchmark == nullptr) auto [benchmark, prefetch_distance, use_system_allocator] = create_benchmark(count_arguments, arguments);
{ if (benchmark == nullptr)
return 1; {
} return 1;
}
mx::util::core_set cores{}; mx::util::core_set cores{};
while ((cores = benchmark->core_set())) while ((cores = benchmark->core_set()))
{ {
mx::tasking::runtime_guard _(use_system_allocator, cores, prefetch_distance); mx::tasking::runtime_guard _(use_system_allocator, cores, prefetch_distance);
benchmark->start(); benchmark->start();
} }
delete benchmark; delete benchmark;
});
return 0; return 0;
} }