MCPcopy
hub / github.com/apache/casbin / BenchmarkCachedRBACModelWithDomains

Function BenchmarkCachedRBACModelWithDomains

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

Source from the content-addressed store, hash-verified

135}
136
137func BenchmarkCachedRBACModelWithDomains(b *testing.B) {
138 e, _ := NewCachedEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
139
140 b.ResetTimer()
141 for i := 0; i < b.N; i++ {
142 _, _ = e.Enforce("alice", "domain1", "data1", "read")
143 }
144}
145
146func BenchmarkCachedABACModel(b *testing.B) {
147 e, _ := NewCachedEnforcer("examples/abac_model.conf")

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…