aboutsummaryrefslogtreecommitdiffstats
path: root/searchlib
diff options
context:
space:
mode:
authorGeir Storli <geirst@yahooinc.com>2024-02-16 16:43:30 +0000
committerGeir Storli <geirst@yahooinc.com>2024-02-16 16:43:30 +0000
commit2f51cb7496a768a4a3066c08400dade81a19f164 (patch)
treeb3702b3209701973c3ca4f678f03898fb06cf241 /searchlib
parent0fa36a7b5e65dd8d6ae20c7c285c0a207848c15d (diff)
Analyze complex leaf and term search over attributes with fast-search.
Diffstat (limited to 'searchlib')
-rw-r--r--searchlib/src/tests/queryeval/iterator_benchmark/iterator_benchmark_test.cpp318
1 files changed, 202 insertions, 116 deletions
diff --git a/searchlib/src/tests/queryeval/iterator_benchmark/iterator_benchmark_test.cpp b/searchlib/src/tests/queryeval/iterator_benchmark/iterator_benchmark_test.cpp
index c5727abb9b6..377334f4e35 100644
--- a/searchlib/src/tests/queryeval/iterator_benchmark/iterator_benchmark_test.cpp
+++ b/searchlib/src/tests/queryeval/iterator_benchmark/iterator_benchmark_test.cpp
@@ -36,7 +36,6 @@ constexpr uint32_t default_seed = 1234;
std::mt19937 gen(default_seed);
const vespalib::string field = "myfield";
double budget_sec = 1.0;
-using DocidVector = std::vector<uint32_t>;
BitVector::UP
random_docids(uint32_t docid_limit, uint32_t count)
@@ -163,9 +162,18 @@ struct BenchmarkResult {
double estimate;
double cost;
vespalib::string iterator_name;
- BenchmarkResult() : BenchmarkResult(0, 0, 0, 0, 0, "") {}
- BenchmarkResult(double time_ms_in, uint32_t seeks_in, uint32_t hits_in, double estimate_in, double cost_in, const vespalib::string& iterator_name_in)
- : time_ms(time_ms_in), seeks(seeks_in), hits(hits_in), estimate(estimate_in), cost(cost_in), iterator_name(iterator_name_in) {}
+ vespalib::string blueprint_name;
+ BenchmarkResult() : BenchmarkResult(0, 0, 0, 0, 0, "", "") {}
+ BenchmarkResult(double time_ms_in, uint32_t seeks_in, uint32_t hits_in, double estimate_in, double cost_in,
+ const vespalib::string& iterator_name_in, const vespalib::string& blueprint_name_in)
+ : time_ms(time_ms_in),
+ seeks(seeks_in),
+ hits(hits_in),
+ estimate(estimate_in),
+ cost(cost_in),
+ iterator_name(iterator_name_in),
+ blueprint_name(blueprint_name_in)
+ {}
double ns_per_seek() const { return (time_ms / seeks) * 1000.0 * 1000.0; }
double ms_per_cost() const { return (time_ms / cost); }
};
@@ -209,7 +217,7 @@ calc_standard_deviation(const std::vector<double>& values, double average)
return std::sqrt(variance);
}
-class BenchmarkResults {
+class BenchmarkCaseResult {
private:
std::vector<BenchmarkResult> _results;
@@ -231,7 +239,7 @@ private:
}
public:
- BenchmarkResults(): _results() {}
+ BenchmarkCaseResult(): _results() {}
void add(const BenchmarkResult& res) {
_results.push_back(res);
}
@@ -246,28 +254,58 @@ public:
}
};
+std::string
+delete_substr_from(const std::string& source, const std::string& substr)
+{
+ std::string res = source;
+ auto i = res.find(substr);
+ while (i != std::string::npos) {
+ res.erase(i, substr.length());
+ i = res.find(substr, i);
+ }
+ return res;
+}
+
+template <typename T>
+vespalib::string
+get_class_name(const T& obj)
+{
+ auto res = obj.getClassName();
+ res = delete_substr_from(res, "search::attribute::");
+ res = delete_substr_from(res, "search::queryeval::");
+ res = delete_substr_from(res, "vespalib::btree::");
+ res = delete_substr_from(res, "search::");
+ res = delete_substr_from(res, "vespalib::");
+ res = delete_substr_from(res, "anonymous namespace");
+ return res;
+}
+
BenchmarkResult
-strict_search(SearchIterator& itr, uint32_t docid_limit, double estimate, double strict_cost)
+strict_search(Blueprint& blueprint, MatchData& md, uint32_t docid_limit)
{
+ auto itr = blueprint.createSearch(md, true);
+ assert(itr.get());
BenchmarkTimer timer(budget_sec);
uint32_t hits = 0;
while (timer.has_budget()) {
timer.before();
hits = 0;
- itr.initRange(1, docid_limit);
- uint32_t docid = itr.seekFirst(1);
+ itr->initRange(1, docid_limit);
+ uint32_t docid = itr->seekFirst(1);
while (docid < docid_limit) {
++hits;
- docid = itr.seekNext(docid + 1);
+ docid = itr->seekNext(docid + 1);
}
timer.after();
}
- return {timer.min_time() * 1000.0, hits + 1, hits, estimate, strict_cost, itr.getClassName()};
+ return {timer.min_time() * 1000.0, hits + 1, hits, blueprint.estimate(), blueprint.strict_cost(), get_class_name(*itr), get_class_name(blueprint)};
}
BenchmarkResult
-non_strict_search(SearchIterator& itr, uint32_t docid_limit, double estimate, double non_strict_cost)
+non_strict_search(Blueprint& blueprint, MatchData& md, uint32_t docid_limit)
{
+ auto itr = blueprint.createSearch(md, false);
+ assert(itr.get());
BenchmarkTimer timer(budget_sec);
uint32_t seeks = 0;
uint32_t hits = 0;
@@ -275,16 +313,16 @@ non_strict_search(SearchIterator& itr, uint32_t docid_limit, double estimate, do
timer.before();
seeks = 0;
hits = 0;
- itr.initRange(1, docid_limit);
- for (uint32_t docid = 1; !itr.isAtEnd(docid); ++docid) {
+ itr->initRange(1, docid_limit);
+ for (uint32_t docid = 1; !itr->isAtEnd(docid); ++docid) {
++seeks;
- if (itr.seek(docid)) {
+ if (itr->seek(docid)) {
++hits;
}
}
timer.after();
}
- return {timer.min_time() * 1000.0, seeks, hits, estimate, non_strict_cost, itr.getClassName()};
+ return {timer.min_time() * 1000.0, seeks, hits, blueprint.estimate(), blueprint.cost(), get_class_name(*itr), get_class_name(blueprint)};
}
BenchmarkResult
@@ -296,13 +334,9 @@ benchmark_search(Blueprint::UP blueprint, uint32_t docid_limit, bool strict)
// This is OK as long as we don't do unpacking and only use 1 thread.
auto md = MatchData::makeTestInstance(1, 1);
if (strict) {
- auto iterator = blueprint->createSearch(*md, true);
- assert(iterator.get());
- return strict_search(*iterator, docid_limit, blueprint->estimate(), blueprint->strict_cost());
+ return strict_search(*blueprint, *md, docid_limit);
} else {
- auto iterator = blueprint->createSearch(*md, false);
- assert(iterator.get());
- return non_strict_search(*iterator, docid_limit, blueprint->estimate(), blueprint->cost());
+ return non_strict_search(*blueprint, *md, docid_limit);
}
}
@@ -344,12 +378,18 @@ to_string(QueryOperator query_op)
vespalib::string
to_string(const Config& attr_config)
{
+ std::ostringstream oss;
auto col_type = attr_config.collectionType();
auto basic_type = attr_config.basicType();
if (col_type == CollectionType::SINGLE) {
- return basic_type.asString();
+ oss << basic_type.asString();
+ } else {
+ oss << col_type.asString() << "<" << basic_type.asString() << ">";
}
- return vespalib::string(col_type.asString()) + "<" + vespalib::string(basic_type.asString()) + ">";
+ if (attr_config.fastSearch()) {
+ oss << "(fs)";
+ }
+ return oss.str();
}
std::unique_ptr<Node>
@@ -418,7 +458,7 @@ print_result(const BenchmarkResult& res, const benchmark::TermVector& terms, dou
<< ", a_ratio=" << std::setw(5) << ((double) res.hits / (double) num_docs)
<< ", est=" << std::setw(5) << res.estimate
<< ", hits=" << std::setw(7) << res.hits
- << ", seeks=" << std::setw(8) << res.seeks
+ << ", seeks=" << std::setw(9) << res.seeks
<< std::setprecision(2)
<< ", time_ms=" << std::setw(8) << res.time_ms
<< std::setprecision(3)
@@ -426,108 +466,145 @@ print_result(const BenchmarkResult& res, const benchmark::TermVector& terms, dou
<< std::setprecision(2)
<< ", ns_per_seek=" << std::setw(8) << res.ns_per_seek()
<< ", ms_per_cost=" << std::setw(7) << res.ms_per_cost()
- << ", itr=" << res.iterator_name << std::endl;
+ << ", itr= " << res.iterator_name
+ << ", blueprint= " << res.blueprint_name << std::endl;
}
void
-print_results(const BenchmarkResults& results)
+print_result(const BenchmarkCaseResult& result)
{
std::cout << std::fixed << std::setprecision(3)
- << "statistics summary: time_ms=" << results.time_ms_stats().to_string()
- << ", ns_per_seek=" << results.ns_per_seek_stats().to_string()
- << ", ms_per_cost=" << results.ms_per_cost_stats().to_string() << std::endl << std::endl;
+ << "summary: time_ms=" << result.time_ms_stats().to_string()
+ << ", ns_per_seek=" << result.ns_per_seek_stats().to_string()
+ << ", ms_per_cost=" << result.ms_per_cost_stats().to_string() << std::endl << std::endl;
}
struct BenchmarkCase {
Config attr_cfg;
QueryOperator query_op;
bool strict;
- BenchmarkResults results;
- double scaled_cost;
- BenchmarkCase(const Config& attr_cfg_in, QueryOperator query_op_in, bool strict_in, const BenchmarkResults& results_in)
+ BenchmarkCase(const Config& attr_cfg_in, QueryOperator query_op_in, bool strict_in)
: attr_cfg(attr_cfg_in),
query_op(query_op_in),
- strict(strict_in),
- results(results_in),
+ strict(strict_in)
+ {}
+ vespalib::string to_string() const {
+ return "op=" + ::to_string(query_op) + ", cfg=" + ::to_string(attr_cfg) + ", strict=" + (strict ? "true" : "false");
+ }
+};
+
+struct BenchmarkCaseSummary {
+ BenchmarkCase bcase;
+ BenchmarkCaseResult result;
+ double scaled_cost;
+ BenchmarkCaseSummary(const BenchmarkCase& bcase_in, const BenchmarkCaseResult& result_in)
+ : bcase(bcase_in),
+ result(result_in),
scaled_cost(1.0)
{}
- BenchmarkCase(const BenchmarkCase&);
- BenchmarkCase& operator=(const BenchmarkCase&);
- ~BenchmarkCase();
+ BenchmarkCaseSummary(const BenchmarkCaseSummary&);
+ BenchmarkCaseSummary& operator=(const BenchmarkCaseSummary&);
+ ~BenchmarkCaseSummary();
};
-BenchmarkCase::BenchmarkCase(const BenchmarkCase&) = default;
-BenchmarkCase& BenchmarkCase::operator=(const BenchmarkCase&) = default;
-BenchmarkCase::~BenchmarkCase() = default;
+BenchmarkCaseSummary::BenchmarkCaseSummary(const BenchmarkCaseSummary&) = default;
+BenchmarkCaseSummary& BenchmarkCaseSummary::operator=(const BenchmarkCaseSummary&) = default;
+BenchmarkCaseSummary::~BenchmarkCaseSummary() = default;
class BenchmarkSummary {
private:
- std::vector<BenchmarkCase> _cases;
- double _baseline_ms_per_cost;
+ std::vector<BenchmarkCaseSummary> _cases;
public:
- BenchmarkSummary(double baseline_ms_per_cost_in)
- : _cases(),
- _baseline_ms_per_cost(baseline_ms_per_cost_in)
+ BenchmarkSummary()
+ : _cases()
{}
- double baseline_ms_per_cost() const { return _baseline_ms_per_cost; }
- void add(const Config& attr_cfg, QueryOperator query_op, bool strict, const BenchmarkResults& results) {
- _cases.emplace_back(attr_cfg, query_op, strict, results);
+ void add(const BenchmarkCase& bcase, const BenchmarkCaseResult& result) {
+ _cases.emplace_back(bcase, result);
}
void calc_scaled_costs() {
std::sort(_cases.begin(), _cases.end(), [](const auto& lhs, const auto& rhs) {
- return lhs.results.ms_per_cost_stats().average < rhs.results.ms_per_cost_stats().average;
+ return lhs.result.ms_per_cost_stats().average < rhs.result.ms_per_cost_stats().average;
});
- for (auto& c : _cases) {
- c.scaled_cost = c.results.ms_per_cost_stats().average / _baseline_ms_per_cost;
+ double baseline_ms_per_cost = _cases[0].result.ms_per_cost_stats().average;
+ for (size_t i = 1; i < _cases.size(); ++i) {
+ auto& c = _cases[i];
+ c.scaled_cost = c.result.ms_per_cost_stats().average / baseline_ms_per_cost;
}
}
- const std::vector<BenchmarkCase>& cases() const { return _cases; }
+ const std::vector<BenchmarkCaseSummary>& cases() const { return _cases; }
};
-vespalib::string
-to_string(QueryOperator query_op, const Config& attr_cfg, bool strict)
-{
- return "op=" + to_string(query_op) + ", cfg=" + to_string(attr_cfg) + ", strict=" + (strict ? "true" : "false");
-}
-
void
print_summary(const BenchmarkSummary& summary)
{
- std::cout << "-------- benchmark summary (baseline_ms_per_cost=" << summary.baseline_ms_per_cost() << ") --------" << std::endl;
+ std::cout << "-------- benchmark summary --------" << std::endl;
for (const auto& c : summary.cases()) {
std::cout << std::fixed << std::setprecision(3) << ""
- << std::setw(40) << std::left << to_string(c.query_op, c.attr_cfg, c.strict) << ": "
- << "ms_per_cost=" << std::setw(7) << std::right << c.results.ms_per_cost_stats().to_string()
+ << std::setw(50) << std::left << c.bcase.to_string() << ": "
+ << "ms_per_cost=" << std::setw(7) << std::right << c.result.ms_per_cost_stats().to_string()
<< ", scaled_cost=" << std::setw(7) << c.scaled_cost << std::endl;
}
}
-struct BenchmarkSetup {
+struct BenchmarkCaseSetup {
uint32_t num_docs;
- Config attr_cfg;
- QueryOperator query_op;
+ BenchmarkCase bcase;
std::vector<double> hit_ratios;
std::vector<uint32_t> child_counts;
+ uint32_t default_values_per_document;
+ BenchmarkCaseSetup(uint32_t num_docs_in,
+ const BenchmarkCase& bcase_in,
+ const std::vector<double>& hit_ratios_in,
+ const std::vector<uint32_t>& child_counts_in)
+ : num_docs(num_docs_in),
+ bcase(bcase_in),
+ hit_ratios(hit_ratios_in),
+ child_counts(child_counts_in),
+ default_values_per_document(0)
+ {}
+ ~BenchmarkCaseSetup() {}
+};
+
+struct BenchmarkSetup {
+ uint32_t num_docs;
+ std::vector<Config> attr_cfgs;
+ std::vector<QueryOperator> query_ops;
std::vector<bool> strictness;
+ std::vector<double> hit_ratios;
+ std::vector<uint32_t> child_counts;
uint32_t default_values_per_document;
BenchmarkSetup(uint32_t num_docs_in,
- Config attr_cfg_in,
- QueryOperator query_op_in,
+ const std::vector<Config>& attr_cfgs_in,
+ const std::vector<QueryOperator>& query_ops_in,
+ const std::vector<bool>& strictness_in,
const std::vector<double>& hit_ratios_in,
- const std::vector<uint32_t>& child_counts_in,
- const std::vector<bool>& strictness_in)
+ const std::vector<uint32_t>& child_counts_in)
: num_docs(num_docs_in),
- attr_cfg(attr_cfg_in),
- query_op(query_op_in),
+ attr_cfgs(attr_cfgs_in),
+ query_ops(query_ops_in),
+ strictness(strictness_in),
hit_ratios(hit_ratios_in),
child_counts(child_counts_in),
- strictness(strictness_in),
default_values_per_document(0)
{}
- ~BenchmarkSetup() {}
+ BenchmarkSetup(uint32_t num_docs_in,
+ const std::vector<Config>& attr_cfgs_in,
+ const std::vector<QueryOperator>& query_ops_in,
+ const std::vector<bool>& strictness_in,
+ const std::vector<double>& hit_ratios_in)
+ : BenchmarkSetup(num_docs_in, attr_cfgs_in, query_ops_in, strictness_in, hit_ratios_in, {1})
+ {}
+ BenchmarkCaseSetup make_case_setup(const BenchmarkCase& bcase) const {
+ BenchmarkCaseSetup res(num_docs, bcase, hit_ratios, child_counts);
+ res.default_values_per_document = default_values_per_document;
+ return res;
+ }
+ ~BenchmarkSetup();
};
+BenchmarkSetup::~BenchmarkSetup() = default;
+
uint32_t
calc_hits_per_term(uint32_t num_docs, double target_hit_ratio, uint32_t children, QueryOperator query_op)
{
@@ -540,27 +617,43 @@ calc_hits_per_term(uint32_t num_docs, double target_hit_ratio, uint32_t children
}
}
-BenchmarkResults
+BenchmarkCaseResult
+run_benchmark_case(const BenchmarkCaseSetup& setup)
+{
+ BenchmarkCaseResult result;
+ std::cout << "-------- run_benchmark_case: " << setup.bcase.to_string() << " --------" << std::endl;
+ for (double hit_ratio : setup.hit_ratios) {
+ for (uint32_t children : setup.child_counts) {
+ uint32_t hits_per_term = calc_hits_per_term(setup.num_docs, hit_ratio, children, setup.bcase.query_op);
+ HitSpecs hit_specs(55555);
+ hit_specs.add(setup.default_values_per_document, setup.num_docs);
+ auto terms = hit_specs.add(children, hits_per_term);
+ auto attr_ctx = make_attribute_context(setup.bcase.attr_cfg, setup.num_docs, hit_specs);
+ auto res = run_benchmark(*attr_ctx, setup.bcase.query_op, terms, setup.num_docs + 1, setup.bcase.strict);
+ print_result(res, terms, hit_ratio, setup.num_docs);
+ result.add(res);
+ }
+ }
+ print_result(result);
+ return result;
+}
+
+void
run_benchmarks(const BenchmarkSetup& setup)
{
- BenchmarkResults results;
- for (bool strict : setup.strictness) {
- std::cout << "-------- run_benchmarks: " << to_string(setup.query_op, setup.attr_cfg, strict) << " --------" << std::endl;
- for (double hit_ratio : setup.hit_ratios) {
- for (uint32_t children : setup.child_counts) {
- uint32_t hits_per_term = calc_hits_per_term(setup.num_docs, hit_ratio, children, setup.query_op);
- HitSpecs hit_specs(55555);
- hit_specs.add(setup.default_values_per_document, setup.num_docs);
- auto terms = hit_specs.add(children, hits_per_term);
- auto attr_ctx = make_attribute_context(setup.attr_cfg, setup.num_docs, hit_specs);
- auto res = run_benchmark(*attr_ctx, setup.query_op, terms, setup.num_docs + 1, strict);
- print_result(res, terms, hit_ratio, setup.num_docs);
- results.add(res);
+ BenchmarkSummary summary;
+ for (const auto& attr_cfg : setup.attr_cfgs) {
+ for (auto query_op : setup.query_ops) {
+ for (bool strict : setup.strictness) {
+ BenchmarkCase bcase(attr_cfg, query_op, strict);
+ auto case_setup = setup.make_case_setup(bcase);
+ auto results = run_benchmark_case(case_setup);
+ summary.add(bcase, results);
}
}
}
- print_results(results);
- return results;
+ summary.calc_scaled_costs();
+ print_summary(summary);
}
Config
@@ -572,67 +665,60 @@ make_config(BasicType basic_type, CollectionType col_type, bool fast_search)
}
constexpr uint32_t num_docs = 10'000'000;
-const std::vector<double> hit_ratios = {0.001, 0.01, 0.1, 0.5};
-const std::vector<uint32_t> child_counts = {1, 10, 100, 1000};
+const std::vector<double> base_hit_ratios = {0.001, 0.01, 0.1, 0.5};
const Config int32 = make_config(BasicType::INT32, CollectionType::SINGLE, false);
const Config int32_fs = make_config(BasicType::INT32, CollectionType::SINGLE, true);
const Config int32_array = make_config(BasicType::INT32, CollectionType::ARRAY, false);
const Config int32_array_fs = make_config(BasicType::INT32, CollectionType::ARRAY, true);
const Config int32_wset_fs = make_config(BasicType::INT32, CollectionType::WSET, true);
const Config str = make_config(BasicType::STRING, CollectionType::SINGLE, false);
+const Config str_fs = make_config(BasicType::STRING, CollectionType::SINGLE, true);
const Config str_array = make_config(BasicType::STRING, CollectionType::ARRAY, false);
+const Config str_array_fs = make_config(BasicType::STRING, CollectionType::ARRAY, true);
TEST(IteratorBenchmark, analyze_term_search_in_attributes_without_fast_search)
{
std::vector<Config> attr_cfgs = {int32, int32_array, str, str_array};
- const std::vector<double> my_hit_ratios = {0.001, 0.005, 0.01, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9};
- BenchmarkSummary summary(25.0);
- for (const auto& attr_cfg : attr_cfgs) {
- for (bool strict : {true, false}) {
- BenchmarkSetup setup(num_docs, attr_cfg, QueryOperator::Term, my_hit_ratios, {1}, {strict});
- setup.default_values_per_document = 1;
- auto results = run_benchmarks(setup);
- summary.add(attr_cfg, QueryOperator::Term, strict, results);
- }
- }
- summary.calc_scaled_costs();
- print_summary(summary);
-}
-
-TEST(IteratorBenchmark, term_benchmark)
-{
- BenchmarkSetup setup(num_docs, int32_fs, QueryOperator::Term, hit_ratios, {1}, {true, false});
+ const std::vector<double> hit_ratios = {0.001, 0.005, 0.01, 0.05, 0.1, 0.3, 0.5, 0.7, 0.9};
+ BenchmarkSetup setup(num_docs, attr_cfgs, {QueryOperator::Term}, {true, false}, hit_ratios);
+ setup.default_values_per_document = 1;
run_benchmarks(setup);
}
-TEST(IteratorBenchmark, in_benchmark)
+TEST(IteratorBenchmark, analyze_term_search_in_attributes_with_fast_search)
{
- BenchmarkSetup setup(num_docs, int32_array_fs, QueryOperator::In, hit_ratios, child_counts, {true, false});
+ std::vector<Config> attr_cfgs = {int32_array, int32_fs}; //, int32_array_fs, str_fs, str_array_fs};
+ const std::vector<double> hit_ratios = {0.001, 0.01, 0.1, 0.2, 0.4, 0.6, 0.8, 1.0};
+ BenchmarkSetup setup(num_docs, attr_cfgs, {QueryOperator::Term}, {true, false}, hit_ratios);
+ setup.default_values_per_document = 1;
run_benchmarks(setup);
}
-TEST(IteratorBenchmark, weighted_set_benchmark)
+TEST(IteratorBenchmark, analyze_complex_leaf_operators)
{
- BenchmarkSetup setup(num_docs, int32_array_fs, QueryOperator::WeightedSet, hit_ratios, child_counts, {true, false});
+ std::vector<Config> attr_cfgs = {int32_array_fs};
+ std::vector<QueryOperator> query_ops = {QueryOperator::In, QueryOperator::DotProduct};
+ const std::vector<double> hit_ratios = {0.001, 0.01, 0.1, 0.2, 0.4, 0.6, 0.8};
+ BenchmarkSetup setup(num_docs, attr_cfgs, query_ops, {true, false}, hit_ratios, {1, 2, 10, 100});
run_benchmarks(setup);
}
-TEST(IteratorBenchmark, dot_product_benchmark)
+TEST(IteratorBenchmark, term_benchmark)
{
- BenchmarkSetup setup(num_docs, int32_wset_fs, QueryOperator::DotProduct, hit_ratios, child_counts, {true, false});
+ BenchmarkSetup setup(num_docs, {int32_fs}, {QueryOperator::Term}, {true, false}, base_hit_ratios);
run_benchmarks(setup);
}
TEST(IteratorBenchmark, and_benchmark)
{
- BenchmarkSetup setup(num_docs, int32_array_fs, QueryOperator::And, hit_ratios, {1, 2, 4, 8}, {true, false});
+ BenchmarkSetup setup(num_docs, {int32_array_fs}, {QueryOperator::And}, {true, false}, base_hit_ratios, {1, 2, 4, 8});
run_benchmarks(setup);
}
TEST(IteratorBenchmark, or_benchmark)
{
- BenchmarkSetup setup(num_docs, int32_array_fs, QueryOperator::Or, hit_ratios, child_counts, {true, false});
+ BenchmarkSetup setup(num_docs, {int32_array_fs}, {QueryOperator::Or}, {true, false}, base_hit_ratios, {1, 10, 100, 1000});
run_benchmarks(setup);
}