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

Function ErrorSchemeResult

cpp/src/arrow/type_benchmark.cc:355–370  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

353}
354
355static void ErrorSchemeResult(benchmark::State& state) { // NOLINT non-const reference
356 auto integers = RandomIntegers();
357
358 for (auto _ : state) {
359 int64_t total = 0;
360 for (const auto v : integers) {
361 auto maybe_value = ErrorAsResult(v);
362 if (ARROW_PREDICT_TRUE(maybe_value.ok())) {
363 total = Accumulate(total, *std::move(maybe_value));
364 }
365 }
366 benchmark::DoNotOptimize(total);
367 }
368
369 state.SetItemsProcessed(state.iterations() * integers.size());
370}
371
372static void ErrorSchemeResultNoInline(
373 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