| 388 | } |
| 389 | |
| 390 | static void ErrorSchemeException(benchmark::State& state) { // NOLINT non-const reference |
| 391 | auto integers = RandomIntegers(); |
| 392 | |
| 393 | for (auto _ : state) { |
| 394 | int64_t total = 0; |
| 395 | for (const auto v : integers) { |
| 396 | try { |
| 397 | total = Accumulate(total, ErrorAsException(v)); |
| 398 | } catch (const std::exception&) { |
| 399 | } |
| 400 | } |
| 401 | benchmark::DoNotOptimize(total); |
| 402 | } |
| 403 | |
| 404 | state.SetItemsProcessed(state.iterations() * integers.size()); |
| 405 | } |
| 406 | |
| 407 | static void ErrorSchemeExceptionNoInline( |
| 408 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected