From f57aa6aee34c5eccd296fbe6b655075c682e97ca Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 23 Dec 2024 11:59:52 -0500 Subject: Began migrating benchmarks over to new interface --- benchmarks/include/standard_benchmarks.h | 22 ++++++++++++++++++++-- 1 file changed, 20 insertions(+), 2 deletions(-) (limited to 'benchmarks/include/standard_benchmarks.h') diff --git a/benchmarks/include/standard_benchmarks.h b/benchmarks/include/standard_benchmarks.h index d3408c1..dfa6513 100644 --- a/benchmarks/include/standard_benchmarks.h +++ b/benchmarks/include/standard_benchmarks.h @@ -19,11 +19,29 @@ #include "benchmark_types.h" #include "psu-util/bentley-saxe.h" #include "shard/ISAMTree.h" +#include "framework/reconstruction/LevelingPolicy.h" +#include "framework/reconstruction/TieringPolicy.h" +#include "framework/reconstruction/BSMPolicy.h" +constexpr double delete_proportion = 0.05; static size_t g_deleted_records = 0; -static double delete_proportion = 0.5; +static size_t total = 0; + +template Q> +de::ReconstructionPolicy *get_policy(size_t scale_factor, size_t buffer_size, int policy=0) { + + de::ReconstructionPolicy *recon = nullptr; + + if (policy == 0) { + recon = new de::TieringPolicy(scale_factor, buffer_size); + } else if (policy == 1) { + recon = new de::LevelingPolicy(scale_factor, buffer_size); + } else if (policy == 2) { + recon = new de::BSMPolicy(buffer_size); + } -static volatile size_t total = 0; + return recon; +} template static void run_queries(DE *extension, std::vector &queries) { -- cgit v1.2.3