(b *testing.B)
| 35 | } |
| 36 | |
| 37 | func BenchmarkCachedRBACModel(b *testing.B) { |
| 38 | e, _ := NewCachedEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv") |
| 39 | |
| 40 | b.ResetTimer() |
| 41 | for i := 0; i < b.N; i++ { |
| 42 | _, _ = e.Enforce("alice", "data2", "read") |
| 43 | } |
| 44 | } |
| 45 | |
| 46 | func BenchmarkCachedRBACModelSmall(b *testing.B) { |
| 47 | e, _ := NewCachedEnforcer("examples/rbac_model.conf") |
nothing calls this directly
no test coverage detected
searching dependent graphs…