From 911eb0ef61dc7d327507c6406120a80797190884 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Tue, 12 Aug 2025 13:25:50 -0400 Subject: file_util.h: Swapped from random_shuffle to shuffle --- benchmarks/include/file_util.h | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'benchmarks') diff --git a/benchmarks/include/file_util.h b/benchmarks/include/file_util.h index 2d340e6..ef7e464 100644 --- a/benchmarks/include/file_util.h +++ b/benchmarks/include/file_util.h @@ -8,6 +8,7 @@ #include #include #include +#include #include #include #include @@ -214,7 +215,9 @@ static std::vector generate_uniform(size_t n) { records[i].value = i; } - std::random_shuffle(records.begin(), records.end()); + std::random_device rd; + std::mt19937 g(rd()); + std::shuffle(records.begin(), records.end(), g); return records; } -- cgit v1.2.3 From 601481ed0a8061a372900cfb6761e8de81651339 Mon Sep 17 00:00:00 2001 From: "Douglas B. Rumbaugh" Date: Thu, 14 Aug 2025 09:09:44 -0400 Subject: Per record cost estimation progress --- .../tail-latency/isam_construction_times.cpp | 87 ++++++++++++++++++++++ 1 file changed, 87 insertions(+) create mode 100644 benchmarks/tail-latency/isam_construction_times.cpp (limited to 'benchmarks') diff --git a/benchmarks/tail-latency/isam_construction_times.cpp b/benchmarks/tail-latency/isam_construction_times.cpp new file mode 100644 index 0000000..ecf085c --- /dev/null +++ b/benchmarks/tail-latency/isam_construction_times.cpp @@ -0,0 +1,87 @@ +/* + * + */ + +#define ENABLE_TIMER +#define TS_TEST + +#include "framework/scheduling/FIFOScheduler.h" +#include "framework/DynamicExtension.h" +#include "shard/ISAMTree.h" +#include "query/rangecount.h" +#include "framework/interface/Record.h" +#include "file_util.h" +#include "standard_benchmarks.h" +#include "framework/util/Configuration.h" + +#include + + +typedef de::Record Rec; +typedef de::ISAMTreeShard; +typedef de::rc::Query Q; +typedef de::DynamicExtension Ext; +typedef Q::Parameters QP; +typedef de::DEConfiguration + Conf; + +void usage(char *progname) { + fprintf(stderr, "%s reccnt datafile\n", progname); +} + +int main(int argc, char **argv) { + + if (argc < 3) { + usage(argv[0]); + exit(EXIT_FAILURE); + } + + size_t n = atol(argv[1]); + std::string d_fname = std::string(argv[2]); + + + auto data = read_sosd_file(d_fname, n); + + std::vector policies = {6}; + std::vector buffers = {12000}; + std::vector sfs = {8}; + + for (size_t l=0; l(sfs[k], buffers[j], policies[l]); + auto config = Conf(std::move(policy)); + config.recon_enable_maint_on_flush = true; + config.recon_maint_disabled = false; + // config.buffer_flush_trigger = 4000; + config.maximum_threads = 6; + auto extension = new Ext(std::move(config)); + + /* warmup structure w/ 10% of records */ + size_t warmup = .1 * n; + for (size_t i=0; iinsert(data[i])) { + usleep(1); + } + } + + extension->await_version(); + + for (size_t i=warmup; iinsert(data[i])) { + usleep(1); + } + } + + extension->await_version(); + + extension->print_scheduler_statistics(); + delete extension; + + }}} + + + fflush(stderr); +} + -- cgit v1.2.3