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

Function BenchmarkRBACModelWithDomains

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

Source from the content-addressed store, hash-verified

221}
222
223func BenchmarkRBACModelWithDomains(b *testing.B) {
224 e, _ := NewEnforcer("examples/rbac_with_domains_model.conf", "examples/rbac_with_domains_policy.csv")
225
226 b.ResetTimer()
227 for i := 0; i < b.N; i++ {
228 _, _ = e.Enforce("alice", "domain1", "data1", "read")
229 }
230}
231
232func BenchmarkABACModel(b *testing.B) {
233 e, _ := NewEnforcer("examples/abac_model.conf")

Callers

nothing calls this directly

Calls 2

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…