| 353 | } |
| 354 | |
| 355 | static 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 | |
| 372 | static void ErrorSchemeResultNoInline( |
| 373 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected