summaryrefslogtreecommitdiffstats
path: root/benchmarks/include/bench.h
diff options
context:
space:
mode:
authorDouglas Rumbaugh <dbr4@psu.edu>2023-07-25 11:17:36 -0400
committerDouglas Rumbaugh <dbr4@psu.edu>2023-07-25 11:17:36 -0400
commit37434f5baf632e839dc14b3c7d8745287cb9368a (patch)
tree4b9a77c25b734872a1b815cc7c0bad6258784601 /benchmarks/include/bench.h
parent9e869d32344d5bd8ee703a0733d80d48d458217c (diff)
downloaddynamic-extension-37434f5baf632e839dc14b3c7d8745287cb9368a.tar.gz
Benchmarks: mtree and vptree benchmark updates
Note: cosine similarity doesn't seem to work for VPTree--I don't think that it is actually a metric, upon further research. At the very least I can't find anyone claiming it is, and I've found several people claiming it isn't. On testing with the Word2Vec data, Euclidean distance works insofar as the M-Tree and VPTree return the same KNN results for test queries, whereas Cosine Similarity does not work.
Diffstat (limited to 'benchmarks/include/bench.h')
-rw-r--r--benchmarks/include/bench.h3
1 files changed, 2 insertions, 1 deletions
diff --git a/benchmarks/include/bench.h b/benchmarks/include/bench.h
index 12d0a7e..586ff12 100644
--- a/benchmarks/include/bench.h
+++ b/benchmarks/include/bench.h
@@ -85,7 +85,7 @@ static bool insert_tput_bench(DE &de_index, std::fstream &file, size_t insert_cn
}
template <typename DE, de::RecordInterface R, typename QP, bool PROGRESS=true>
-static bool query_latency_bench(DE &de_index, std::vector<QP> queries, size_t trial_cnt=100) {
+static bool query_latency_bench(DE &de_index, std::vector<QP> queries, size_t trial_cnt=1) {
char progbuf[25];
if constexpr (PROGRESS) {
sprintf(progbuf, "querying:");
@@ -102,6 +102,7 @@ static bool query_latency_bench(DE &de_index, std::vector<QP> queries, size_t tr
auto start = std::chrono::high_resolution_clock::now();
for (size_t j=0; j<queries.size(); j++) {
auto res = de_index.query(&queries[j]);
+
total_results += res.size();
}
auto stop = std::chrono::high_resolution_clock::now();