| 370 | } |
| 371 | |
| 372 | static void ErrorSchemeResultNoInline( |
| 373 | benchmark::State& state) { // NOLINT non-const reference |
| 374 | auto integers = RandomIntegers(); |
| 375 | |
| 376 | for (auto _ : state) { |
| 377 | int64_t total = 0; |
| 378 | for (const auto v : integers) { |
| 379 | auto maybe_value = ErrorAsResultNoInline(v); |
| 380 | if (ARROW_PREDICT_TRUE(maybe_value.ok())) { |
| 381 | total = Accumulate(total, *std::move(maybe_value)); |
| 382 | } |
| 383 | } |
| 384 | benchmark::DoNotOptimize(total); |
| 385 | } |
| 386 | |
| 387 | state.SetItemsProcessed(state.iterations() * integers.size()); |
| 388 | } |
| 389 | |
| 390 | static void ErrorSchemeException(benchmark::State& state) { // NOLINT non-const reference |
| 391 | auto integers = RandomIntegers(); |
nothing calls this directly
no test coverage detected