diff options
| author | Douglas Rumbaugh <dbr4@psu.edu> | 2024-12-23 11:59:52 -0500 |
|---|---|---|
| committer | Douglas Rumbaugh <dbr4@psu.edu> | 2024-12-23 11:59:52 -0500 |
| commit | f57aa6aee34c5eccd296fbe6b655075c682e97ca (patch) | |
| tree | 24a33e247bb7786fbc6685e2bace84124e0d2d09 /benchmarks/include/standard_benchmarks.h | |
| parent | 2724b98da8699af150e850e66e92e0a832cd2e29 (diff) | |
| download | dynamic-extension-f57aa6aee34c5eccd296fbe6b655075c682e97ca.tar.gz | |
Began migrating benchmarks over to new interface
Diffstat (limited to 'benchmarks/include/standard_benchmarks.h')
| -rw-r--r-- | benchmarks/include/standard_benchmarks.h | 22 |
1 files changed, 20 insertions, 2 deletions
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<de::ShardInterface S, de::QueryInterface<S> Q> +de::ReconstructionPolicy<S, Q> *get_policy(size_t scale_factor, size_t buffer_size, int policy=0) { + + de::ReconstructionPolicy<S, Q> *recon = nullptr; + + if (policy == 0) { + recon = new de::TieringPolicy<S,Q>(scale_factor, buffer_size); + } else if (policy == 1) { + recon = new de::LevelingPolicy<S, Q>(scale_factor, buffer_size); + } else if (policy == 2) { + recon = new de::BSMPolicy<S, Q>(buffer_size); + } -static volatile size_t total = 0; + return recon; +} template<typename DE, typename Q, bool BSM=false> static void run_queries(DE *extension, std::vector<typename Q::Parameters> &queries) { |