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

Function BM_PolicyNative

eval/tests/benchmark_test.cc:267–278  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

265}
266
267void BM_PolicyNative(benchmark::State& state) {
268 const auto denylists =
269 absl::flat_hash_set<std::string>{"10.0.1.4", "10.0.1.5", "10.0.1.6"};
270 const auto allowlists =
271 absl::flat_hash_set<std::string>{"10.0.1.1", "10.0.1.2", "10.0.1.3"};
272 auto attributes = absl::btree_map<std::string, std::string>{
273 {"ip", kIP}, {"token", kToken}, {"path", kPath}};
274 for (auto _ : state) {
275 auto result = NativeCheck(attributes, denylists, allowlists);
276 ASSERT_TRUE(result);
277 }
278}
279
280BENCHMARK(BM_PolicyNative);
281

Callers

nothing calls this directly

Calls 1

NativeCheckFunction · 0.70

Tested by

no test coverage detected