| 246 | }; |
| 247 | |
| 248 | void BM_ParseAddress(benchmark::State& state) { |
| 249 | bool optimize = state.range(0); |
| 250 | auto runner = BenchmarkState::Create(optimize); |
| 251 | |
| 252 | ABSL_CHECK_OK(runner.status()); |
| 253 | |
| 254 | auto program = runner->MakeProgram("net.parseAddress('1.2.3.4')"); |
| 255 | ABSL_CHECK_OK(program.status()); |
| 256 | |
| 257 | google::protobuf::Arena arena; |
| 258 | Activation activation; |
| 259 | for (auto s : state) { |
| 260 | auto result = (*program)->Evaluate(&arena, activation); |
| 261 | ABSL_CHECK_OK(result.status()); |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | void BM_ParseAddressVar(benchmark::State& state) { |
| 266 | bool optimize = state.range(0); |
nothing calls this directly
no test coverage detected