MCPcopy Create free account
hub / github.com/apache/impala / RunNumBlocksBenchmark

Function RunNumBlocksBenchmark

be/src/benchmarks/scheduler-benchmark.cc:152–163  ·  view source on GitHub ↗

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'.

Source from the content-addressed store, hash-verified

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'.
152void 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
165int main(int argc, char** argv) {
166 impala::InitCommonRuntime(argc, argv, true, impala::TestInfo::BE_TEST);

Callers 1

mainFunction · 0.85

Calls 5

InitializeTestCtxFunction · 0.85
SubstituteFunction · 0.85
AddBenchmarkMethod · 0.80
sizeMethod · 0.45
MeasureMethod · 0.45

Tested by

no test coverage detected