MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / BM_ParseAddressVar

Function BM_ParseAddressVar

codelab/network_functions_test.cc:265–281  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

263}
264
265void 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
283void BM_ParseAddressMatcher(benchmark::State& state) {
284 bool optimize = state.range(0);

Callers

nothing calls this directly

Calls 3

MakeProgramMethod · 0.80
InsertOrAssignValueMethod · 0.80
EvaluateMethod · 0.45

Tested by

no test coverage detected