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

Function BM_PolicyNative

eval/tests/modern_benchmark_test.cc:321–332  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

319}
320
321void BM_PolicyNative(benchmark::State& state) {
322 const auto denylists =
323 absl::flat_hash_set<std::string>{"10.0.1.4", "10.0.1.5", "10.0.1.6"};
324 const auto allowlists =
325 absl::flat_hash_set<std::string>{"10.0.1.1", "10.0.1.2", "10.0.1.3"};
326 auto attributes = absl::btree_map<std::string, std::string>{
327 {"ip", kIP}, {"token", kToken}, {"path", kPath}};
328 for (auto _ : state) {
329 auto result = NativeCheck(attributes, denylists, allowlists);
330 ASSERT_TRUE(result);
331 }
332}
333
334BENCHMARK(BM_PolicyNative);
335

Callers

nothing calls this directly

Calls 1

NativeCheckFunction · 0.70

Tested by

no test coverage detected