| 299 | } |
| 300 | |
| 301 | void BM_ParseAddressMatcherMatches(benchmark::State& state) { |
| 302 | bool optimize = state.range(0); |
| 303 | auto runner = BenchmarkState::Create(optimize); |
| 304 | |
| 305 | ABSL_CHECK_OK(runner.status()); |
| 306 | |
| 307 | auto program = runner->MakeProgram( |
| 308 | "net.parseAddressMatcher('8.8.8.0-8.8.8.255').containsAddress(net." |
| 309 | "parseAddress('8.8.8.1'))"); |
| 310 | ABSL_CHECK_OK(program.status()); |
| 311 | |
| 312 | google::protobuf::Arena arena; |
| 313 | Activation activation; |
| 314 | for (auto s : state) { |
| 315 | auto result = (*program)->Evaluate(&arena, activation); |
| 316 | ABSL_CHECK_OK(result.status()); |
| 317 | } |
| 318 | } |
| 319 | |
| 320 | void BM_ParseAddressMatcherMatchesVar(benchmark::State& state) { |
| 321 | bool optimize = state.range(0); |
nothing calls this directly
no test coverage detected