Thanks to visit codestin.com
Credit goes to casbin.apache.org

Ana içeriğe atla

Benchmarks

This page reports enforcement overhead (time and memory per Enforce() call) for different models and rule sizes. Results depend on hardware and language; use them as a rough guide.

Go benchmarks: model_b_test.go. Environment:

Intel(R) Core(TM) i7-6700HQ CPU @ 2.60GHz, 2601 Mhz, 4 Core(s), 8 Logical Processor(s)

Results from go test -bench=. -benchmem (op = one Enforce() call, ms = millisecond, KB = kilobytes):

Test senaryosuKural boyutuZaman ek yükü (ms/op)Bellek ek yükü (KB)
ACL2 kural (2 kullanıcı)0.0154935.649
RBAC5 kural (2 kullanıcı, 1 rol)0.0217387.522
RBAC (küçük)1100 kurallar (1000 kullanıcı, 100 roller)0,16430980,620
RBAC (orta)11000 kurallar (10000 kullanıcı, 1000 roller)2,258262765,152
RBAC (büyük)110000 kurallar (100000 kullanıcı, 10000 roller)23,9167767.606
Kaynak rolleri ile RBAC6 kural (2 kullanıcı, 2 rol)0,0211467,906
Alanlar/kiracılar ile RBAC6 kural (2 kullanıcı, 1 rol, 2 alan)0,03269610,755
ABAC0 kural (0 kullanıcı)0.0075102.328
RESTful5 kural (3 kullanıcı)0.04539891.774
Reddet-üstünlük6 kural (2 kullanıcı, 1 rol)0.0232818.370
Öncelik9 kural (2 kullanıcı, 2 rol)0.0163895.313

Benchmark izleme

The embedded page below displays Casbin's performance across commits.

Direct access: https://v1.casbin.org/casbin/benchmark-monitoring