summaryrefslogtreecommitdiffstats
path: root/benchmarks/include/bench.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-07-24 18:51:12 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-07-24 18:51:12 -0400
commitad95b1312b86426e149362166a560dea0ba920fe (patch)
treef1ceed253329803b77aa6d095b4540d7ad402428 /benchmarks/include/bench.h
parent5ab408321dd45865a88fed71d11efe01dd7715d9 (diff)
downloaddynamic-extension-ad95b1312b86426e149362166a560dea0ba920fe.tar.gz
M-Tree benchmarks
Diffstat (limited to 'benchmarks/include/bench.h')
-rw-r--r--benchmarks/include/bench.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/benchmarks/include/bench.h b/benchmarks/include/bench.h
index d90bc3f..12d0a7e 100644
--- a/benchmarks/include/bench.h
+++ b/benchmarks/include/bench.h
@@ -51,6 +51,8 @@ static bool insert_tput_bench(DE &de_index, std::fstream &file, size_t insert_cn
if (applied_deletes < delete_cnt && delete_idx < delete_vec.size() && gsl_rng_uniform(g_rng) < delete_prop) {
if constexpr (std::is_same_v<TreeMap, DE>) {
de_index.erase_one(delete_vec[delete_idx++].key);
+ } else if constexpr (std::is_same_v<MTree, DE>) {
+ de_index.remove(delete_vec[delete_idx++]);
} else {
de_index.erase(delete_vec[delete_idx++]);
}
@@ -58,7 +60,11 @@ static bool insert_tput_bench(DE &de_index, std::fstream &file, size_t insert_cn
}
// insert the record;
- de_index.insert(insert_vec[i]);
+ if constexpr (std::is_same_v<MTree, DE>) {
+ de_index.add(insert_vec[i]);
+ } else {
+ de_index.insert(insert_vec[i]);
+ }
applied_inserts++;
}
auto insert_stop = std::chrono::high_resolution_clock::now();