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

Function BM_ParseAddressMatcher

codelab/network_functions_test.cc:283–299  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

281}
282
283void BM_ParseAddressMatcher(benchmark::State& state) {
284 bool optimize = state.range(0);
285 auto runner = BenchmarkState::Create(optimize);
286
287 ABSL_CHECK_OK(runner.status());
288
289 auto program =
290 runner->MakeProgram("net.parseAddressMatcher('8.8.8.0-8.8.8.255')");
291 ABSL_CHECK_OK(program.status());
292
293 google::protobuf::Arena arena;
294 Activation activation;
295 for (auto s : state) {
296 auto result = (*program)->Evaluate(&arena, activation);
297 ABSL_CHECK_OK(result.status());
298 }
299}
300
301void BM_ParseAddressMatcherMatches(benchmark::State& state) {
302 bool optimize = state.range(0);

Callers

nothing calls this directly

Calls 2

MakeProgramMethod · 0.80
EvaluateMethod · 0.45

Tested by

no test coverage detected