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

Function BM_ParseAddress

codelab/network_functions_test.cc:248–263  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

246};
247
248void 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
265void BM_ParseAddressVar(benchmark::State& state) {
266 bool optimize = state.range(0);

Callers

nothing calls this directly

Calls 2

MakeProgramMethod · 0.80
EvaluateMethod · 0.45

Tested by

no test coverage detected