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

Function BM_ParseAddressMatcherMatches

codelab/network_functions_test.cc:301–318  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

299}
300
301void 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
320void BM_ParseAddressMatcherMatchesVar(benchmark::State& state) {
321 bool optimize = state.range(0);

Callers

nothing calls this directly

Calls 2

MakeProgramMethod · 0.80
EvaluateMethod · 0.45

Tested by

no test coverage detected