| 263 | } |
| 264 | |
| 265 | void BM_ParseAddressVar(benchmark::State& state) { |
| 266 | bool optimize = state.range(0); |
| 267 | auto runner = BenchmarkState::Create(optimize); |
| 268 | |
| 269 | ABSL_CHECK_OK(runner.status()); |
| 270 | |
| 271 | auto program = runner->MakeProgram("net.parseAddress(ip)"); |
| 272 | ABSL_CHECK_OK(program.status()); |
| 273 | |
| 274 | google::protobuf::Arena arena; |
| 275 | Activation activation; |
| 276 | activation.InsertOrAssignValue("ip", StringValue::From("8.8.8.8", &arena)); |
| 277 | for (auto s : state) { |
| 278 | auto result = (*program)->Evaluate(&arena, activation); |
| 279 | ABSL_CHECK_OK(result.status()); |
| 280 | } |
| 281 | } |
| 282 | |
| 283 | void BM_ParseAddressMatcher(benchmark::State& state) { |
| 284 | bool optimize = state.range(0); |
nothing calls this directly
no test coverage detected