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

Function ErrorSchemeResult

cpp/src/arrow/type_benchmark.cc:369–384  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

367}
368
369static void ErrorSchemeResult(benchmark::State& state) { // NOLINT non-const reference
370 auto integers = RandomIntegers();
371
372 for (auto _ : state) {
373 int64_t total = 0;
374 for (const auto v : integers) {
375 auto maybe_value = ErrorAsResult(v);
376 if (ARROW_PREDICT_TRUE(maybe_value.ok())) {
377 total = Accumulate(total, *std::move(maybe_value));
378 }
379 }
380 benchmark::DoNotOptimize(total);
381 }
382
383 state.SetItemsProcessed(state.iterations() * integers.size());
384}
385
386static void ErrorSchemeResultNoInline(
387 benchmark::State& state) { // NOLINT non-const reference

Callers

nothing calls this directly

Calls 5

RandomIntegersFunction · 0.85
ErrorAsResultFunction · 0.85
AccumulateFunction · 0.85
okMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected