| 4378 | } |
| 4379 | |
| 4380 | void parse_stl(bm::State &state, std::string_view config_text) { |
| 4381 | std::size_t pairs = 0, bytes = 0; |
| 4382 | std::vector<std::pair<std::string, std::string>> settings; |
| 4383 | for (auto _ : state) { |
| 4384 | settings.clear(); |
| 4385 | config_parse_stl(config_text, settings); |
| 4386 | bm::DoNotOptimize(settings); |
| 4387 | pairs += settings.size(); |
| 4388 | bytes += config_text.size(); |
| 4389 | } |
| 4390 | state.SetBytesProcessed(bytes); |
| 4391 | state.counters["pairs/s"] = bm::Counter(pairs, bm::Counter::kIsRate); |
| 4392 | } |
| 4393 | |
| 4394 | /** |
| 4395 | * The STL's `std::ranges::views::split` won't compile with a predicate lambda, |
nothing calls this directly
no test coverage detected