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

Function BenchmarkRBACModel

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

Source from the content-addressed store, hash-verified

47}
48
49func BenchmarkRBACModel(b *testing.B) {
50 e, _ := NewEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv")
51
52 b.ResetTimer()
53 for i := 0; i < b.N; i++ {
54 _, _ = e.Enforce("alice", "data2", "read")
55 }
56}
57
58func BenchmarkRBACModelSizes(b *testing.B) {
59 cases := []struct {

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…