Build and run a benchmark suite for various table sizes with the default cluster size. Scheduling will be done according to the parameter 'replica_preference'.
| 150 | /// Build and run a benchmark suite for various table sizes with the default cluster size. |
| 151 | /// Scheduling will be done according to the parameter 'replica_preference'. |
| 152 | void RunNumBlocksBenchmark(TReplicaPreference::type replica_preference) { |
| 153 | Benchmark suite("Number of Blocks", false /* micro_heuristics */); |
| 154 | vector<TestCtx> test_ctx(NUM_BLOCKS_PER_TABLE.size()); |
| 155 | |
| 156 | for (int i = 0; i < NUM_BLOCKS_PER_TABLE.size(); ++i) { |
| 157 | int num_blocks = NUM_BLOCKS_PER_TABLE[i]; |
| 158 | InitializeTestCtx(DEFAULT_CLUSTER_SIZE, num_blocks, replica_preference, &test_ctx[i]); |
| 159 | string benchmark_name = strings::Substitute("$0 Blocks", num_blocks); |
| 160 | suite.AddBenchmark(benchmark_name, BenchmarkFunction, &test_ctx[i]); |
| 161 | } |
| 162 | cout << suite.Measure() << endl; |
| 163 | } |
| 164 | |
| 165 | int main(int argc, char** argv) { |
| 166 | impala::InitCommonRuntime(argc, argv, true, impala::TestInfo::BE_TEST); |
no test coverage detected