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

Function ErrorSchemeStatus

cpp/src/arrow/type_benchmark.cc:334–349  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

332}
333
334static void ErrorSchemeStatus(benchmark::State& state) { // NOLINT non-const reference
335 auto integers = RandomIntegers();
336
337 for (auto _ : state) {
338 int64_t total = 0;
339 for (const auto v : integers) {
340 int32_t value = 0;
341 if (ARROW_PREDICT_TRUE(ErrorAsStatus(v, &value).ok())) {
342 total = Accumulate(total, value);
343 }
344 }
345 benchmark::DoNotOptimize(total);
346 }
347
348 state.SetItemsProcessed(state.iterations() * integers.size());
349}
350
351static void ErrorSchemeStatusNoInline(
352 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