(b *testing.B)
| 254 | } |
| 255 | |
| 256 | func BenchmarkKeyMatchModel(b *testing.B) { |
| 257 | e, _ := NewEnforcer("examples/keymatch_model.conf", "examples/keymatch_policy.csv") |
| 258 | |
| 259 | b.ResetTimer() |
| 260 | for i := 0; i < b.N; i++ { |
| 261 | _, _ = e.Enforce("alice", "/alice_data/resource1", "GET") |
| 262 | } |
| 263 | } |
| 264 | |
| 265 | func BenchmarkRBACModelWithDeny(b *testing.B) { |
| 266 | e, _ := NewEnforcer("examples/rbac_with_deny_model.conf", "examples/rbac_with_deny_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…