(b *testing.B)
| 212 | } |
| 213 | |
| 214 | func BenchmarkRBACModelWithResourceRoles(b *testing.B) { |
| 215 | e, _ := NewEnforcer("examples/rbac_with_resource_roles_model.conf", "examples/rbac_with_resource_roles_policy.csv") |
| 216 | |
| 217 | b.ResetTimer() |
| 218 | for i := 0; i < b.N; i++ { |
| 219 | _, _ = e.Enforce("alice", "data1", "read") |
| 220 | } |
| 221 | } |
| 222 | |
| 223 | func BenchmarkRBACModelWithDomains(b *testing.B) { |
| 224 | e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…