/* * */ #define ENABLE_TIMER #include "shard/ISAMTree.h" #include "query/rangequery.h" #include "framework/interface/Record.h" #include "file_util.h" #include "benchmark_types.h" #include #include "psu-util/timer.h" #include "standard_benchmarks.h" #include "psu-ds/BTree.h" typedef btree_record Rec; typedef de::ISAMTree Shard; typedef de::irs::Query Q; typedef Q::Parameters QP; void usage(char *progname) { fprintf(stderr, "%s reccnt datafile queryfile\n", progname); } int main(int argc, char **argv) { if (argc < 4) { usage(argv[0]); exit(EXIT_FAILURE); } size_t n = atol(argv[1]); std::string d_fname = std::string(argv[2]); std::string q_fname = std::string(argv[3]); auto btree = BenchBTree(); auto data = read_sosd_file(d_fname, n); /* read in the range queries and add sample size and rng for sampling */ auto queries = read_range_queries(q_fname, .0001); /* warmup structure w/ 10% of records */ size_t warmup = .3 * n; for (size_t i=0; i