-
Notifications
You must be signed in to change notification settings - Fork 1
/
benchmark.txt
88 lines (88 loc) · 11.3 KB
/
benchmark.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
goos: linux
goarch: amd64
pkg: github.com/abichinger/fastac
cpu: AMD Ryzen 5 3600 6-Core Processor
BenchmarkCmpRBAC/users_roles_objects=10000_100_1000/enforcer=Casbin-12 15 76026610 ns/op 18440929 B/op 601103 allocs/op
BenchmarkCmpRBAC/users_roles_objects=10000_100_1000/enforcer=FastAC-12 4434 295876 ns/op 45336 B/op 2503 allocs/op
BenchmarkCmpRBAC/users_roles_objects=100000_100_1000/enforcer=Casbin-12 21 61622356 ns/op 18439778 B/op 601102 allocs/op
BenchmarkCmpRBAC/users_roles_objects=100000_100_1000/enforcer=FastAC-12 4383 274753 ns/op 45336 B/op 2503 allocs/op
BenchmarkCmpRBAC/users_roles_objects=10000_1000_100/enforcer=Casbin-12 13 80021530 ns/op 18526633 B/op 600228 allocs/op
BenchmarkCmpRBAC/users_roles_objects=10000_1000_100/enforcer=FastAC-12 2179 587740 ns/op 95736 B/op 4303 allocs/op
BenchmarkCmpRBAC/users_roles_objects=100000_1000_100/enforcer=Casbin-12 20 56384209 ns/op 18514783 B/op 600229 allocs/op
BenchmarkCmpRBAC/users_roles_objects=100000_1000_100/enforcer=FastAC-12 2011 589359 ns/op 95736 B/op 4303 allocs/op
BenchmarkCmpAddPolicy/size=Large(10000)/enforcer=Casbin-12 764203 1530 ns/op 541 B/op 13 allocs/op
BenchmarkCmpAddPolicy/size=Large(10000)/enforcer=FastAC-12 422336 3123 ns/op 1576 B/op 30 allocs/op
BenchmarkCmpAddPolicy/size=Medium(1000)/enforcer=Casbin-12 932336 1545 ns/op 597 B/op 13 allocs/op
BenchmarkCmpAddPolicy/size=Medium(1000)/enforcer=FastAC-12 391428 2998 ns/op 1480 B/op 30 allocs/op
BenchmarkCmpAddPolicy/size=Empty(0)/enforcer=Casbin-12 1000000 1633 ns/op 579 B/op 13 allocs/op
BenchmarkCmpAddPolicy/size=Empty(0)/enforcer=FastAC-12 375562 3129 ns/op 1487 B/op 30 allocs/op
BenchmarkCmpRemovePolicy/size=Large(1000)/enforcer=Casbin-12 1000000 1300 ns/op 286 B/op 11 allocs/op
BenchmarkCmpRemovePolicy/size=Large(1000)/enforcer=FastAC-12 995804 1256 ns/op 270 B/op 10 allocs/op
BenchmarkCmpRemovePolicy/size=Medium(100)/enforcer=Casbin-12 819357 1252 ns/op 286 B/op 11 allocs/op
BenchmarkCmpRemovePolicy/size=Medium(100)/enforcer=FastAC-12 1002799 1212 ns/op 270 B/op 10 allocs/op
BenchmarkCmpRemovePolicy/size=Empty(0)/enforcer=Casbin-12 1000000 1119 ns/op 286 B/op 11 allocs/op
BenchmarkCmpRemovePolicy/size=Empty(0)/enforcer=FastAC-12 1000000 1167 ns/op 270 B/op 10 allocs/op
BenchmarkCmpABAC/size=Large(1000)/enforcer=Casbin-12 46 21821606 ns/op 4406406 B/op 100069 allocs/op
BenchmarkCmpABAC/size=Large(1000)/enforcer=FastAC-12 1286 871665 ns/op 167723 B/op 4666 allocs/op
BenchmarkCmpABAC/size=Medium(100)/enforcer=Casbin-12 656 2276771 ns/op 441411 B/op 10015 allocs/op
BenchmarkCmpABAC/size=Medium(100)/enforcer=FastAC-12 1454 761935 ns/op 161869 B/op 4378 allocs/op
BenchmarkCmpABAC/size=Small(10)/enforcer=Casbin-12 5168 228868 ns/op 45357 B/op 1009 allocs/op
BenchmarkCmpABAC/size=Small(10)/enforcer=FastAC-12 8883 116628 ns/op 27297 B/op 700 allocs/op
BenchmarkCmpPathMatch/pkg=FastAC/name=PathMatch/KeyMatch2-12 12826821 100.4 ns/op 0 B/op 0 allocs/op
BenchmarkCmpPathMatch/pkg=Casbin/name=PathMatch/KeyMatch2-12 87345 15333 ns/op 9254 B/op 116 allocs/op
BenchmarkACL/rules=1000/users=10/objects=100-12 23313 52920 ns/op 6344 B/op 288 allocs/op
BenchmarkACL/rules=1000/users=100/objects=10-12 23242 52022 ns/op 6344 B/op 288 allocs/op
BenchmarkACL/rules=1000/users=1000/objects=1-12 3140 394311 ns/op 34856 B/op 2070 allocs/op
BenchmarkACL/rules=10000/users=10/objects=1000-12 4120 285095 ns/op 35144 B/op 2088 allocs/op
BenchmarkACL/rules=10000/users=100/objects=100-12 14182 84294 ns/op 9224 B/op 468 allocs/op
BenchmarkACL/rules=10000/users=1000/objects=10-12 4701 331071 ns/op 35144 B/op 2088 allocs/op
BenchmarkACL/rules=100000/users=10/objects=10000-12 499 2269611 ns/op 323144 B/op 20088 allocs/op
BenchmarkACL/rules=100000/users=100/objects=1000-12 4668 261682 ns/op 38024 B/op 2268 allocs/op
BenchmarkACL/rules=100000/users=1000/objects=100-12 4872 257209 ns/op 38024 B/op 2268 allocs/op
BenchmarkACLWithPaths/rules=1000/users=10/objects=100-12 11665 105032 ns/op 12608 B/op 496 allocs/op
BenchmarkACLWithPaths/rules=1000/users=100/objects=10-12 21246 57165 ns/op 7568 B/op 316 allocs/op
BenchmarkACLWithPaths/rules=1000/users=1000/objects=1-12 3645 361196 ns/op 35576 B/op 2080 allocs/op
BenchmarkACLWithPaths/rules=10000/users=10/objects=1000-12 2088 799003 ns/op 91808 B/op 4096 allocs/op
BenchmarkACLWithPaths/rules=10000/users=100/objects=100-12 10041 133017 ns/op 15488 B/op 676 allocs/op
BenchmarkACLWithPaths/rules=10000/users=1000/objects=10-12 4506 330287 ns/op 36368 B/op 2116 allocs/op
BenchmarkACLWithPaths/rules=100000/users=10/objects=10000-12 222 4691435 ns/op 883808 B/op 40096 allocs/op
BenchmarkACLWithPaths/rules=100000/users=100/objects=1000-12 2199 530905 ns/op 94688 B/op 4276 allocs/op
BenchmarkACLWithPaths/rules=100000/users=1000/objects=100-12 4348 276193 ns/op 44288 B/op 2476 allocs/op
BenchmarkRBAC/rules=1000/roles=10/users=1000/objects=100-12 19240 63910 ns/op 7432 B/op 314 allocs/op
BenchmarkRBAC/rules=1000/roles=10/users=10000/objects=100-12 19492 61331 ns/op 7432 B/op 314 allocs/op
BenchmarkRBAC/rules=1000/roles=10/users=100000/objects=100-12 30373 37347 ns/op 7432 B/op 314 allocs/op
BenchmarkRBAC/rules=1000/roles=100/users=1000/objects=10-12 10657 113575 ns/op 12472 B/op 494 allocs/op
BenchmarkRBAC/rules=1000/roles=100/users=10000/objects=10-12 10000 105213 ns/op 12472 B/op 494 allocs/op
BenchmarkRBAC/rules=1000/roles=100/users=100000/objects=10-12 18781 63393 ns/op 12472 B/op 494 allocs/op
BenchmarkRBAC/rules=1000/roles=1000/users=1000/objects=1-12 1398 860603 ns/op 91385 B/op 4076 allocs/op
BenchmarkRBAC/rules=1000/roles=1000/users=10000/objects=1-12 1512 814446 ns/op 91384 B/op 4076 allocs/op
BenchmarkRBAC/rules=1000/roles=1000/users=100000/objects=1-12 2398 538672 ns/op 91384 B/op 4076 allocs/op
BenchmarkRBAC/rules=10000/roles=10/users=1000/objects=1000-12 4651 367706 ns/op 36232 B/op 2114 allocs/op
BenchmarkRBAC/rules=10000/roles=10/users=10000/objects=1000-12 3783 305222 ns/op 36232 B/op 2114 allocs/op
BenchmarkRBAC/rules=10000/roles=10/users=100000/objects=1000-12 4970 241585 ns/op 36232 B/op 2114 allocs/op
BenchmarkRBAC/rules=10000/roles=100/users=1000/objects=100-12 10000 136986 ns/op 15352 B/op 674 allocs/op
BenchmarkRBAC/rules=10000/roles=100/users=10000/objects=100-12 10000 111005 ns/op 15352 B/op 674 allocs/op
BenchmarkRBAC/rules=10000/roles=100/users=100000/objects=100-12 14419 86934 ns/op 15352 B/op 674 allocs/op
BenchmarkRBAC/rules=10000/roles=1000/users=1000/objects=10-12 2006 857140 ns/op 91672 B/op 4094 allocs/op
BenchmarkRBAC/rules=10000/roles=1000/users=10000/objects=10-12 1726 685673 ns/op 91672 B/op 4094 allocs/op
BenchmarkRBAC/rules=10000/roles=1000/users=100000/objects=10-12 2041 538341 ns/op 91672 B/op 4094 allocs/op
BenchmarkRBAC/rules=100000/roles=10/users=1000/objects=10000-12 458 2335848 ns/op 324232 B/op 20114 allocs/op
BenchmarkRBAC/rules=100000/roles=10/users=10000/objects=10000-12 434 2309203 ns/op 324232 B/op 20114 allocs/op
BenchmarkRBAC/rules=100000/roles=10/users=100000/objects=10000-12 536 2350116 ns/op 324232 B/op 20114 allocs/op
BenchmarkRBAC/rules=100000/roles=100/users=1000/objects=1000-12 4376 299035 ns/op 44152 B/op 2474 allocs/op
BenchmarkRBAC/rules=100000/roles=100/users=10000/objects=1000-12 4441 286797 ns/op 44152 B/op 2474 allocs/op
BenchmarkRBAC/rules=100000/roles=100/users=100000/objects=1000-12 4046 286314 ns/op 44152 B/op 2474 allocs/op
BenchmarkRBAC/rules=100000/roles=1000/users=1000/objects=100-12 1852 605199 ns/op 94552 B/op 4274 allocs/op
BenchmarkRBAC/rules=100000/roles=1000/users=10000/objects=100-12 2222 589988 ns/op 94552 B/op 4274 allocs/op
BenchmarkRBAC/rules=100000/roles=1000/users=100000/objects=100-12 2134 561284 ns/op 94552 B/op 4274 allocs/op
BenchmarkABAC/rules=1000/subrules=10/objects=100-12 15211 77327 ns/op 17791 B/op 439 allocs/op
BenchmarkABAC/rules=1000/subrules=100/objects=10-12 1292 808335 ns/op 164291 B/op 4129 allocs/op
BenchmarkABAC/rules=1000/subrules=1000/objects=1-12 152 8795283 ns/op 1642599 B/op 41036 allocs/op
BenchmarkABAC/rules=10000/subrules=10/objects=1000-12 14846 90122 ns/op 17609 B/op 439 allocs/op
BenchmarkABAC/rules=10000/subrules=100/objects=100-12 1816 837632 ns/op 163221 B/op 4129 allocs/op
BenchmarkABAC/rules=10000/subrules=1000/objects=10-12 151 8385343 ns/op 1619207 B/op 41031 allocs/op
BenchmarkABAC/rules=100000/subrules=10/objects=10000-12 20312 56628 ns/op 17430 B/op 439 allocs/op
BenchmarkABAC/rules=100000/subrules=100/objects=1000-12 2552 516366 ns/op 161820 B/op 4129 allocs/op
BenchmarkABAC/rules=100000/subrules=1000/objects=100-12 220 5385705 ns/op 1604494 B/op 41029 allocs/op
PASS
ok github.com/abichinger/fastac 178.946s