(b *testing.B)
| 172 | } |
| 173 | |
| 174 | func BenchmarkCachedPriorityModel(b *testing.B) { |
| 175 | e, _ := NewCachedEnforcer("examples/priority_model.conf", "examples/priority_policy.csv") |
| 176 | |
| 177 | b.ResetTimer() |
| 178 | for i := 0; i < b.N; i++ { |
| 179 | _, _ = e.Enforce("alice", "data1", "read") |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | func BenchmarkCachedWithEnforceContext(b *testing.B) { |
| 184 | e, _ := NewCachedEnforcer("examples/priority_model_enforce_context.conf", "examples/priority_policy_enforce_context.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…