MCPcopy Create free account
hub / github.com/apache/arrow / ErrorSchemeStatus

Function ErrorSchemeStatus

cpp/src/arrow/type_benchmark.cc:320–335  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

318}
319
320static void ErrorSchemeStatus(benchmark::State& state) { // NOLINT non-const reference
321 auto integers = RandomIntegers();
322
323 for (auto _ : state) {
324 int64_t total = 0;
325 for (const auto v : integers) {
326 int32_t value = 0;
327 if (ARROW_PREDICT_TRUE(ErrorAsStatus(v, &value).ok())) {
328 total = Accumulate(total, value);
329 }
330 }
331 benchmark::DoNotOptimize(total);
332 }
333
334 state.SetItemsProcessed(state.iterations() * integers.size());
335}
336
337static void ErrorSchemeStatusNoInline(
338 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 5

RandomIntegersFunction · 0.85
ErrorAsStatusFunction · 0.85
AccumulateFunction · 0.85
okMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected