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

Function BenchmarkCachedRBACModelWithResourceRoles

enforcer_cached_b_test.go:128–135  ·  view source on GitHub ↗
(b *testing.B)

Source from the content-addressed store, hash-verified

126}
127
128func BenchmarkCachedRBACModelWithResourceRoles(b *testing.B) {
129 e, _ := NewCachedEnforcer("examples/rbac_with_resource_roles_model.conf", "examples/rbac_with_resource_roles_policy.csv")
130
131 b.ResetTimer()
132 for i := 0; i < b.N; i++ {
133 _, _ = e.Enforce("alice", "data1", "read")
134 }
135}
136
137func BenchmarkCachedRBACModelWithDomains(b *testing.B) {
138 e, _ := NewCachedEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")

Callers

nothing calls this directly

Calls 2

EnforceMethod · 0.95
NewCachedEnforcerFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…