(b *testing.B)
| 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") |
| 173 | e.AddNamedMatchingFunc("g", "", util.KeyMatch4) |
| 174 | e.AddNamedDomainMatchingFunc("g", "", util.KeyMatch4) |
| 175 | rm := e.rmMap["g"] |
| 176 | b.ResetTimer() |
| 177 | for i := 0; i < b.N; i++ { |
| 178 | _, _ = rm.HasLink("staffUser1001", "staff001", "/orgs/1/sites/site001") |
| 179 | } |
| 180 | } |
| 181 | |
| 182 | // BenchmarkConcurrentHasLinkWithMatching benchmarks concurrent HasLink performance with matching functions. |
| 183 | // Performance test for concurrent access with temporary role creation. |
nothing calls this directly
no test coverage detected
searching dependent graphs…