(b *testing.B)
| 159 | } |
| 160 | |
| 161 | func BenchmarkHasLinkWithDomainPatternLarge(b *testing.B) { |
| 162 | e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv") |
| 163 | e.AddNamedDomainMatchingFunc("g", "", util.KeyMatch4) |
| 164 | rm := e.rmMap["g"] |
| 165 | b.ResetTimer() |
| 166 | for i := 0; i < b.N; i++ { |
| 167 | _, _ = rm.HasLink("staffUser1001", "staff001", "/orgs/1/sites/site001") |
| 168 | } |
| 169 | } |
| 170 | |
| 171 | func BenchmarkHasLinkWithPatternAndDomainPatternLarge(b *testing.B) { |
| 172 | e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv") |
nothing calls this directly
no test coverage detected
searching dependent graphs…