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

Function BenchmarkBuildRoleLinksWithDomainPatternLarge

role_manager_b_test.go:132–139  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

130}
131
132func BenchmarkBuildRoleLinksWithDomainPatternLarge(b *testing.B) {
133 e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv")
134 e.AddNamedDomainMatchingFunc("g", "", util.KeyMatch4)
135 b.ResetTimer()
136 for i := 0; i < b.N; i++ {
137 _ = e.BuildRoleLinks()
138 }
139}
140
141func BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge(b *testing.B) {
142 e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv")

Callers

nothing calls this directly

Calls 3

BuildRoleLinksMethod · 0.95
NewEnforcerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…