From dea7f559c4fa5cd603ce23d66c3c1b9311adc1cb Mon Sep 17 00:00:00 2001 From: Douglas Rumbaugh Date: Mon, 22 Jan 2024 13:33:11 -0500 Subject: WAtermark testing benchmark --- benchmarks/watermark_testing.cpp | 53 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 benchmarks/watermark_testing.cpp diff --git a/benchmarks/watermark_testing.cpp b/benchmarks/watermark_testing.cpp new file mode 100644 index 0000000..1abe7f5 --- /dev/null +++ b/benchmarks/watermark_testing.cpp @@ -0,0 +1,53 @@ +/* + * + */ + +#define ENABLE_TIMER + +#include "framework/DynamicExtension.h" +#include "shard/ISAMTree.h" +#include "query/rangequery.h" +#include "framework/interface/Record.h" + +#include "psu-util/timer.h" + + +typedef de::Record Rec; +typedef de::ISAMTree ISAM; +typedef de::rq::Query Q; +typedef de::DynamicExtension Ext; + + + +int main(int argc, char **argv) { + std::vector hwms = {5000l, 10000l, 20000l, 50000l}; + std::vector lwms = {.1, .2, .3, .4, .5}; + + size_t n = 1000000; + + TIMER_INIT(); + + for (auto &hwm : hwms) { + for (size_t i=0; iinsert(r)) { + _mm_pause(); + } + } + TIMER_STOP(); + + auto insert_time = TIMER_RESULT(); + double insert_throughput = (double) n / (double) insert_time * 1e9; + + fprintf(stdout, "%ld\t%ld\t%lf\n", lwm, hwm, insert_throughput); + + delete extension; + } + } +} + -- cgit v1.2.3