From 7862ffbd14ea8b53e85176fea42284910a3ce84f Mon Sep 17 00:00:00 2001 From: Tomasz Grabiec Date: Fri, 6 Oct 2023 23:48:25 +0200 Subject: [PATCH] perf_simple_query: Allow running with tablets --- test/perf/perf_simple_query.cc | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/perf/perf_simple_query.cc b/test/perf/perf_simple_query.cc index 26dbf1e99c..980082da66 100644 --- a/test/perf/perf_simple_query.cc +++ b/test/perf/perf_simple_query.cc @@ -514,6 +514,8 @@ int scylla_simple_query_main(int argc, char** argv) { ("concurrency", bpo::value()->default_value(100), "workers per core") ("operations-per-shard", bpo::value(), "run this many operations per shard (overrides duration)") ("counters", "test counters") + ("tablets", "use tablets") + ("initial-tablets", bpo::value()->default_value(128), "initial number of tablets") ("flush", "flush memtables before test") ("json-result", bpo::value(), "name of the json result file") ("enable-cache", bpo::value()->default_value(true), "enable row cache") @@ -539,8 +541,13 @@ int scylla_simple_query_main(int argc, char** argv) { const auto enable_cache = app.configuration()["enable-cache"].as(); std::cout << "enable-cache=" << enable_cache << '\n'; db_cfg->enable_cache(enable_cache); - cql_test_config cfg(db_cfg); + if (app.configuration().contains("tablets")) { + cfg.db_config->experimental_features({db::experimental_features_t::feature::TABLETS}, + db::config::config_source::CommandLine); + cfg.db_config->consistent_cluster_management(true); + cfg.initial_tablets = app.configuration()["initial-tablets"].as(); + } return do_with_cql_env_thread([&app] (auto&& env) { auto cfg = test_config(); cfg.partitions = app.configuration()["partitions"].as();