| 265 | } |
| 266 | |
| 267 | void 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 | |
| 280 | BENCHMARK(BM_PolicyNative); |
| 281 |
nothing calls this directly
no test coverage detected