| 254 | } |
| 255 | |
| 256 | static void ErrorSchemeNoError(benchmark::State& state) { // NOLINT non-const reference |
| 257 | auto integers = RandomIntegers(); |
| 258 | |
| 259 | for (auto _ : state) { |
| 260 | int64_t total = 0; |
| 261 | for (const auto v : integers) { |
| 262 | total = Accumulate(total, NoError(v)); |
| 263 | } |
| 264 | benchmark::DoNotOptimize(total); |
| 265 | } |
| 266 | |
| 267 | state.SetItemsProcessed(state.iterations() * integers.size()); |
| 268 | } |
| 269 | |
| 270 | static void ErrorSchemeNoErrorNoInline( |
| 271 | benchmark::State& state) { // NOLINT non-const reference |
nothing calls this directly
no test coverage detected