From c04efb2640421be7a24f851c08e290c89b7b46f2 Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 10 Feb 2025 17:19:10 -0500 Subject: Migrated remaining tail latency benchmarks to new interface --- CMakeLists.txt | 18 +++++++++--------- benchmarks/tail-latency/config_sweep.cpp | 12 ++++++------ benchmarks/tail-latency/fixed_shard_count.cpp | 8 ++++---- 3 files changed, 19 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 644d1de..f0d8a86 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -287,15 +287,15 @@ endif() if (tail_bench) set(CMAKE_RUNTIME_OUTPUT_DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/bin/benchmarks") - # add_executable(config_sweep ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/tail-latency/config_sweep.cpp) - # target_link_libraries(config_sweep PUBLIC gsl pthread atomic) - # target_include_directories(config_sweep PRIVATE include external external/m-tree/cpp external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include) - # target_link_options(config_sweep PUBLIC -mcx16) - - # add_executable(fixed_shard_count ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/tail-latency/fixed_shard_count.cpp) - # target_link_libraries(fixed_shard_count PUBLIC gsl pthread atomic) - # target_include_directories(fixed_shard_count PRIVATE include external external/m-tree/cpp external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include) - # target_link_options(fixed_shard_count PUBLIC -mcx16) + add_executable(config_sweep ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/tail-latency/config_sweep.cpp) + target_link_libraries(config_sweep PUBLIC gsl pthread atomic) + target_include_directories(config_sweep PRIVATE include external external/m-tree/cpp external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include) + target_link_options(config_sweep PUBLIC -mcx16) + + add_executable(fixed_shard_count ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/tail-latency/fixed_shard_count.cpp) + target_link_libraries(fixed_shard_count PUBLIC gsl pthread atomic) + target_include_directories(fixed_shard_count PRIVATE include external external/m-tree/cpp external/PGM-index/include external/PLEX/include benchmarks/include external/psudb-common/cpp/include) + target_link_options(fixed_shard_count PUBLIC -mcx16) add_executable(standard_latency_dist ${CMAKE_CURRENT_SOURCE_DIR}/benchmarks/tail-latency/standard_latency_dist.cpp) target_link_libraries(standard_latency_dist PUBLIC gsl pthread atomic) diff --git a/benchmarks/tail-latency/config_sweep.cpp b/benchmarks/tail-latency/config_sweep.cpp index d973ee5..abc3f86 100644 --- a/benchmarks/tail-latency/config_sweep.cpp +++ b/benchmarks/tail-latency/config_sweep.cpp @@ -53,7 +53,7 @@ int main(int argc, char **argv) { for (size_t j=0; j(sfs[k], buffers[j], policies[l]); - auto extension = new Ext(policy, buffers[j]/4, buffers[j]); + auto extension = new Ext(std::move(policy)); /* warmup structure w/ 10% of records */ size_t warmup = .1 * n; @@ -63,7 +63,7 @@ int main(int argc, char **argv) { } } - extension->await_next_epoch(); + extension->await_version(); TIMER_INIT(); @@ -74,10 +74,10 @@ int main(int argc, char **argv) { } TIMER_STOP(); - //fprintf(stdout, "%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); + fprintf(stdout, "I\t%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); } - extension->await_next_epoch(); + extension->await_version(); /* repeat the queries a bunch of times */ for (size_t l=0; l<10; l++) { @@ -88,7 +88,7 @@ int main(int argc, char **argv) { res.get(); TIMER_STOP(); - fprintf(stdout, "%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); + fprintf(stdout, "Q\t%ld\t%ld\t%d\t%ld\n", sfs[k], buffers[j], policies[l], TIMER_RESULT()); } } @@ -97,7 +97,7 @@ int main(int argc, char **argv) { auto res =extension->query(std::move(p)); fprintf(stderr, "%ld\n", res.get()); - extension->await_next_epoch(); + extension->await_version(); delete extension; }}} diff --git a/benchmarks/tail-latency/fixed_shard_count.cpp b/benchmarks/tail-latency/fixed_shard_count.cpp index fecf599..e980bcf 100644 --- a/benchmarks/tail-latency/fixed_shard_count.cpp +++ b/benchmarks/tail-latency/fixed_shard_count.cpp @@ -51,8 +51,8 @@ int main(int argc, char **argv) { size_t buffer_size = 8000; for (size_t i=0; i(buffer_size, shard_counts[i], n); - auto extension = new Ext(policy, buffer_size / 4, buffer_size); + auto policy = get_policy(shard_counts[i], buffer_size, 4, n); + auto extension = new Ext(std::move(policy)); /* warmup structure w/ 10% of records */ size_t warmup = .1 * n; @@ -62,7 +62,7 @@ int main(int argc, char **argv) { } } - extension->await_next_epoch(); + extension->await_version(); TIMER_INIT(); @@ -76,7 +76,7 @@ int main(int argc, char **argv) { auto insert_tput = (size_t) ((double) (n - warmup) / (double) TIMER_RESULT() *1.0e9); - extension->await_next_epoch(); + extension->await_version(); /* repeat the queries a bunch of times */ TIMER_START(); -- cgit v1.2.3