MCPcopy Index your code
hub / github.com/apache/casbin / BenchmarkRBACModelWithDomainPatternLarge

Function BenchmarkRBACModelWithDomainPatternLarge

model_b_test.go:283–291  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

281}
282
283func BenchmarkRBACModelWithDomainPatternLarge(b *testing.B) {
284 e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv")
285 e.AddNamedDomainMatchingFunc("g", "", util.KeyMatch4)
286 _ = e.BuildRoleLinks()
287 b.ResetTimer()
288 for i := 0; i < b.N; i++ {
289 _, _ = e.Enforce("staffUser1001", "/orgs/1/sites/site001", "App001.Module001.Action1001")
290 }
291}

Callers

nothing calls this directly

Calls 4

BuildRoleLinksMethod · 0.95
EnforceMethod · 0.95
NewEnforcerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…