summaryrefslogtreecommitdiffstats
path: root/tests/wirs_tests.cpp
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-05-17 16:00:20 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-05-17 16:00:20 -0400
commit6fd50506d2e50d2faf2478a2883a2ef1b4840a78 (patch)
treeeb29955b435a6e2e6196b9c89de15c6b8885c4f3 /tests/wirs_tests.cpp
parent75a8418b580234521b5fa23340bee959c357acf9 (diff)
downloaddynamic-extension-6fd50506d2e50d2faf2478a2883a2ef1b4840a78.tar.gz
Started implementing shard interface (not finished yet)
Diffstat (limited to 'tests/wirs_tests.cpp')
-rw-r--r--tests/wirs_tests.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/wirs_tests.cpp b/tests/wirs_tests.cpp
index 828362d..c7edec9 100644
--- a/tests/wirs_tests.cpp
+++ b/tests/wirs_tests.cpp
@@ -185,7 +185,8 @@ START_TEST(t_weighted_sampling)
results.reserve(k);
size_t cnt[3] = {0};
for (size_t i=0; i<1000; i++) {
- auto state = shard->get_sample_shard_state(lower_key, upper_key);
+ WIRS<WRec>::wirs_query_parms parms = {lower_key, upper_key};
+ auto state = shard->get_query_state(&parms);
shard->get_samples(state, results, lower_key, upper_key, k, g_rng);
@@ -193,7 +194,7 @@ START_TEST(t_weighted_sampling)
cnt[results[j].key - 1]++;
}
- WIRS<WRec>::delete_state(state);
+ WIRS<WRec>::delete_query_state(state);
}
ck_assert(roughly_equal(cnt[0] / 1000, (double) k/4.0, k, .05));