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

Function RleBenchmark

be/src/benchmarks/rle-benchmark.cc:132–145  ·  view source on GitHub ↗

Benchmark calling RleBatchDecoder ::GetValues().

Source from the content-addressed store, hash-verified

130
131/// Benchmark calling RleBatchDecoder<uint8_t>::GetValues().
132void RleBenchmark(int batch_size, void* data) {
133 for (int i = 0; i < batch_size; ++i) {
134 BenchmarkParams* p = reinterpret_cast<BenchmarkParams*>(data);
135 RleBatchDecoder<uint8_t> decoder(p->input_buffer.data(), p->input_size, p->bit_width);
136 int result = decoder.GetValues(NUM_OUT_VALUES, out_buffer);
137 if (result != NUM_OUT_VALUES) {
138 LOG(ERROR) << Substitute(
139 "Error in GetValues(). bit_width: $0 max_run_length: $1 "
140 "expected number of values: $2 decoded number of values: $3",
141 p->bit_width, p->max_run_length, NUM_OUT_VALUES, result);
142 exit(1);
143 }
144 }
145}
146
147/// Benchmark calling the old version of RleBatchDecoder<uint8_t>::GetValues() that used
148/// memset() for setting repeated values.

Callers

nothing calls this directly

Calls 3

SubstituteFunction · 0.85
GetValuesMethod · 0.80
dataMethod · 0.45

Tested by

no test coverage detected