From fd0e99e618319974320ed3fb49535aec501be1fb Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Thu, 6 Feb 2025 15:56:33 -0500 Subject: Background compaction stuff --- benchmarks/include/standard_benchmarks.h | 12 ++++++++++-- 1 file changed, 10 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 76423ab..2cbe1a8 100644 --- a/benchmarks/include/standard_benchmarks.h +++ b/benchmarks/include/standard_benchmarks.h @@ -14,6 +14,8 @@ #include "framework/DynamicExtension.h" #include "framework/interface/Query.h" +#include "framework/reconstruction/FixedShardCountPolicy.h" +#include "framework/reconstruction/ReconstructionPolicy.h" #include "query/irs.h" #include "psu-util/progress.h" #include "benchmark_types.h" @@ -23,13 +25,14 @@ #include "framework/reconstruction/TieringPolicy.h" #include "framework/reconstruction/BSMPolicy.h" #include "framework/reconstruction/FloodL0Policy.h" +#include "framework/reconstruction/BackgroundTieringPolicy.h" constexpr double delete_proportion = 0.05; static size_t g_deleted_records = 0; static size_t total = 0; template Q> -de::ReconstructionPolicy *get_policy(size_t scale_factor, size_t buffer_size, int policy=0) { +std::unique_ptr> get_policy(size_t scale_factor, size_t buffer_size, int policy=0, size_t reccnt=0) { de::ReconstructionPolicy *recon = nullptr; @@ -41,9 +44,14 @@ de::ReconstructionPolicy *get_policy(size_t scale_factor, size_t buffer_si recon = new de::BSMPolicy(buffer_size); } else if (policy == 3) { recon = new de::FloodL0Policy(buffer_size); + } else if (policy == 4) { + assert(reccnt > 0); + recon = new de::FixedShardCountPolicy(buffer_size, scale_factor, reccnt); + } else if (policy == 5) { + recon = new de::BackgroundTieringPolicy(scale_factor, buffer_size); } - return recon; + return std::unique_ptr>(recon); } template -- cgit v1.2.3