| 402 | } |
| 403 | |
| 404 | static void ErrorSchemeException(benchmark::State& state) { // NOLINT non-const reference |
| 405 | auto integers = RandomIntegers(); |
| 406 | |
| 407 | for (auto _ : state) { |
| 408 | int64_t total = 0; |
| 409 | for (const auto v : integers) { |
| 410 | try { |
| 411 | total = Accumulate(total, ErrorAsException(v)); |
| 412 | } catch (const std::exception&) { |
| 413 | } |
| 414 | } |
| 415 | benchmark::DoNotOptimize(total); |
| 416 | } |
| 417 | |
| 418 | state.SetItemsProcessed(state.iterations() * integers.size()); |
| 419 | } |
| 420 | |
| 421 | static void ErrorSchemeExceptionNoInline( |
| 422 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected