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

Function BenchmarkBuildRoleLinksWithPatternLarge

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

Source from the content-addressed store, hash-verified

121}
122
123func BenchmarkBuildRoleLinksWithPatternLarge(b *testing.B) {
124 e, _ := NewEnforcer("examples/performance/rbac_with_pattern_large_scale_model.conf", "examples/performance/rbac_with_pattern_large_scale_policy.csv")
125 e.AddNamedMatchingFunc("g", "", util.KeyMatch4)
126 b.ResetTimer()
127 for i := 0; i < b.N; i++ {
128 _ = e.BuildRoleLinks()
129 }
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")

Callers

nothing calls this directly

Calls 3

AddNamedMatchingFuncMethod · 0.95
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…