| 319 | } |
| 320 | |
| 321 | void 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 | |
| 334 | BENCHMARK(BM_PolicyNative); |
| 335 |
nothing calls this directly
no test coverage detected