| 297 | } |
| 298 | |
| 299 | static void ErrorSchemeBool(benchmark::State& state) { // NOLINT non-const reference |
| 300 | auto integers = RandomIntegers(); |
| 301 | |
| 302 | for (auto _ : state) { |
| 303 | int64_t total = 0; |
| 304 | for (const auto v : integers) { |
| 305 | auto pair = ErrorAsBool(v); |
| 306 | if (!ARROW_PREDICT_FALSE(pair.first)) { |
| 307 | total = Accumulate(total, pair.second); |
| 308 | } |
| 309 | } |
| 310 | benchmark::DoNotOptimize(total); |
| 311 | } |
| 312 | |
| 313 | state.SetItemsProcessed(state.iterations() * integers.size()); |
| 314 | } |
| 315 | |
| 316 | static void ErrorSchemeBoolNoInline( |
| 317 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected