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

Function RleBenchmarkMemset

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

Benchmark calling the old version of RleBatchDecoder ::GetValues() that used memset() for setting repeated values.

Source from the content-addressed store, hash-verified

147/// Benchmark calling the old version of RleBatchDecoder<uint8_t>::GetValues() that used
148/// memset() for setting repeated values.
149void RleBenchmarkMemset(int batch_size, void* data) {
150 for (int i = 0; i < batch_size; ++i) {
151 BenchmarkParams* p = reinterpret_cast<BenchmarkParams*>(data);
152 RleBatchDecoder<uint8_t> decoder(p->input_buffer.data(), p->input_size, p->bit_width);
153 int result = GetValuesMemset(NUM_OUT_VALUES, out_buffer, &decoder);
154 if (result != NUM_OUT_VALUES) {
155 LOG(ERROR) << Substitute(
156 "Error in GetValuesMemset(). bit_width: $0 max_run_length: $1 "
157 "expected number of values: $2 decoded number of values: $3",
158 p->bit_width, p->max_run_length, NUM_OUT_VALUES, result);
159 exit(1);
160 }
161 }
162}
163
164struct RleBenchmarks {
165 BenchmarkParams params;

Callers

nothing calls this directly

Calls 3

GetValuesMemsetFunction · 0.85
SubstituteFunction · 0.85
dataMethod · 0.45

Tested by

no test coverage detected