-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: support all types for JSON request in ABAC (#1343)
- Loading branch information
1 parent
4d1349a
commit 6703d2f
Showing
4 changed files
with
52 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6703d2f
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Benchmark
BenchmarkCachedRaw - ns/op
17.65
ns/op17.55
ns/op1.01
BenchmarkCachedRaw - B/op
0
B/op0
B/opNaN
BenchmarkCachedRaw - allocs/op
0
allocs/op0
allocs/opNaN
BenchmarkCachedBasicModel - ns/op
165.6
ns/op165.3
ns/op1.00
BenchmarkCachedBasicModel - B/op
104
B/op104
B/op1
BenchmarkCachedBasicModel - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModel - ns/op
161.6
ns/op168.9
ns/op0.96
BenchmarkCachedRBACModel - B/op
104
B/op104
B/op1
BenchmarkCachedRBACModel - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModelSmall - ns/op
176.6
ns/op177.5
ns/op0.99
BenchmarkCachedRBACModelSmall - B/op
104
B/op104
B/op1
BenchmarkCachedRBACModelSmall - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModelMedium - ns/op
188.1
ns/op179.7
ns/op1.05
BenchmarkCachedRBACModelMedium - B/op
104
B/op104
B/op1
BenchmarkCachedRBACModelMedium - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModelLarge - ns/op
156.4
ns/op156.6
ns/op1.00
BenchmarkCachedRBACModelLarge - B/op
96
B/op96
B/op1
BenchmarkCachedRBACModelLarge - allocs/op
3
allocs/op3
allocs/op1
BenchmarkCachedRBACModelWithResourceRoles - ns/op
163.9
ns/op167.3
ns/op0.98
BenchmarkCachedRBACModelWithResourceRoles - B/op
104
B/op104
B/op1
BenchmarkCachedRBACModelWithResourceRoles - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModelWithDomains - ns/op
178.4
ns/op179.6
ns/op0.99
BenchmarkCachedRBACModelWithDomains - B/op
120
B/op120
B/op1
BenchmarkCachedRBACModelWithDomains - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedABACModel - ns/op
2979
ns/op3048
ns/op0.98
BenchmarkCachedABACModel - B/op
1538
B/op1544
B/op1.00
BenchmarkCachedABACModel - allocs/op
18
allocs/op18
allocs/op1
BenchmarkCachedKeyMatchModel - ns/op
176.2
ns/op183.9
ns/op0.96
BenchmarkCachedKeyMatchModel - B/op
152
B/op152
B/op1
BenchmarkCachedKeyMatchModel - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedRBACModelWithDeny - ns/op
168.8
ns/op168.2
ns/op1.00
BenchmarkCachedRBACModelWithDeny - B/op
104
B/op104
B/op1
BenchmarkCachedRBACModelWithDeny - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedPriorityModel - ns/op
162.5
ns/op170.7
ns/op0.95
BenchmarkCachedPriorityModel - B/op
104
B/op104
B/op1
BenchmarkCachedPriorityModel - allocs/op
4
allocs/op4
allocs/op1
BenchmarkCachedWithEnforceContext - ns/op
295.5
ns/op312.8
ns/op0.94
BenchmarkCachedWithEnforceContext - B/op
240
B/op240
B/op1
BenchmarkCachedWithEnforceContext - allocs/op
5
allocs/op5
allocs/op1
BenchmarkCachedRBACModelMediumParallel - ns/op
121.7
ns/op123.9
ns/op0.98
BenchmarkCachedRBACModelMediumParallel - B/op
105
B/op105
B/op1
BenchmarkCachedRBACModelMediumParallel - allocs/op
4
allocs/op4
allocs/op1
BenchmarkHasPolicySmall - ns/op
444.1
ns/op460.3
ns/op0.96
BenchmarkHasPolicySmall - B/op
150
B/op150
B/op1
BenchmarkHasPolicySmall - allocs/op
6
allocs/op6
allocs/op1
BenchmarkHasPolicyMedium - ns/op
483.9
ns/op499.7
ns/op0.97
BenchmarkHasPolicyMedium - B/op
157
B/op157
B/op1
BenchmarkHasPolicyMedium - allocs/op
6
allocs/op6
allocs/op1
BenchmarkHasPolicyLarge - ns/op
503.8
ns/op509.3
ns/op0.99
BenchmarkHasPolicyLarge - B/op
165
B/op165
B/op1
BenchmarkHasPolicyLarge - allocs/op
7
allocs/op7
allocs/op1
BenchmarkAddPolicySmall - ns/op
488.2
ns/op467.3
ns/op1.04
BenchmarkAddPolicySmall - B/op
152
B/op152
B/op1
BenchmarkAddPolicySmall - allocs/op
6
allocs/op6
allocs/op1
BenchmarkAddPolicyMedium - ns/op
563.3
ns/op627.4
ns/op0.90
BenchmarkAddPolicyMedium - B/op
173
B/op173
B/op1
BenchmarkAddPolicyMedium - allocs/op
7
allocs/op7
allocs/op1
BenchmarkAddPolicyLarge - ns/op
1218
ns/op1278
ns/op0.95
BenchmarkAddPolicyLarge - B/op
473
B/op473
B/op1
BenchmarkAddPolicyLarge - allocs/op
9
allocs/op9
allocs/op1
BenchmarkRemovePolicySmall - ns/op
488.5
ns/op481.4
ns/op1.01
BenchmarkRemovePolicySmall - B/op
166
B/op166
B/op1
BenchmarkRemovePolicySmall - allocs/op
7
allocs/op7
allocs/op1
BenchmarkRemovePolicyMedium - ns/op
554.2
ns/op537.3
ns/op1.03
BenchmarkRemovePolicyMedium - B/op
176
B/op176
B/op1
BenchmarkRemovePolicyMedium - allocs/op
7
allocs/op7
allocs/op1
BenchmarkRemovePolicyLarge - ns/op
1212
ns/op1243
ns/op0.98
BenchmarkRemovePolicyLarge - B/op
291
B/op289
B/op1.01
BenchmarkRemovePolicyLarge - allocs/op
13
allocs/op13
allocs/op1
BenchmarkRaw - ns/op
17.68
ns/op17.53
ns/op1.01
BenchmarkRaw - B/op
0
B/op0
B/opNaN
BenchmarkRaw - allocs/op
0
allocs/op0
allocs/opNaN
BenchmarkBasicModel - ns/op
3719
ns/op3706
ns/op1.00
BenchmarkBasicModel - B/op
1508
B/op1510
B/op1.00
BenchmarkBasicModel - allocs/op
17
allocs/op17
allocs/op1
BenchmarkRBACModel - ns/op
5489
ns/op5613
ns/op0.98
BenchmarkRBACModel - B/op
2065
B/op2070
B/op1.00
BenchmarkRBACModel - allocs/op
35
allocs/op35
allocs/op1
BenchmarkRBACModelSizes/small - ns/op
49969
ns/op49082
ns/op1.02
BenchmarkRBACModelSizes/small - B/op
20271
B/op20214
B/op1.00
BenchmarkRBACModelSizes/small - allocs/op
480
allocs/op480
allocs/op1
BenchmarkRBACModelSizes/medium - ns/op
511984
ns/op516834
ns/op0.99
BenchmarkRBACModelSizes/medium - B/op
191257
B/op191758
B/op1.00
BenchmarkRBACModelSizes/medium - allocs/op
4829
allocs/op4830
allocs/op1.00
BenchmarkRBACModelSizes/large - ns/op
5195604
ns/op5709390
ns/op0.91
BenchmarkRBACModelSizes/large - B/op
1906391
B/op1899742
B/op1.00
BenchmarkRBACModelSizes/large - allocs/op
48353
allocs/op48170
allocs/op1.00
BenchmarkRBACModelSmall - ns/op
59230
ns/op61393
ns/op0.96
BenchmarkRBACModelSmall - B/op
20352
B/op20339
B/op1.00
BenchmarkRBACModelSmall - allocs/op
615
allocs/op615
allocs/op1
BenchmarkRBACModelMedium - ns/op
576178
ns/op579667
ns/op0.99
BenchmarkRBACModelMedium - B/op
194638
B/op194721
B/op1.00
BenchmarkRBACModelMedium - allocs/op
6020
allocs/op6021
allocs/op1.00
BenchmarkRBACModelLarge - ns/op
6073531
ns/op6169723
ns/op0.98
BenchmarkRBACModelLarge - B/op
1940496
B/op1941098
B/op1.00
BenchmarkRBACModelLarge - allocs/op
60599
allocs/op60621
allocs/op1.00
BenchmarkRBACModelWithResourceRoles - ns/op
4605
ns/op4716
ns/op0.98
BenchmarkRBACModelWithResourceRoles - B/op
1846
B/op1847
B/op1.00
BenchmarkRBACModelWithResourceRoles - allocs/op
27
allocs/op27
allocs/op1
BenchmarkRBACModelWithDomains - ns/op
5123
ns/op5296
ns/op0.97
BenchmarkRBACModelWithDomains - B/op
1824
B/op1828
B/op1.00
BenchmarkRBACModelWithDomains - allocs/op
25
allocs/op25
allocs/op1
BenchmarkABACModel - ns/op
2858
ns/op2876
ns/op0.99
BenchmarkABACModel - B/op
1536
B/op1536
B/op1
BenchmarkABACModel - allocs/op
17
allocs/op17
allocs/op1
BenchmarkABACRuleModel - ns/op
3982954
ns/op3977634
ns/op1.00
BenchmarkABACRuleModel - B/op
1330745
B/op1327819
B/op1.00
BenchmarkABACRuleModel - allocs/op
40092
allocs/op40092
allocs/op1
BenchmarkKeyMatchModel - ns/op
6212
ns/op6287
ns/op0.99
BenchmarkKeyMatchModel - B/op
3064
B/op3072
B/op1.00
BenchmarkKeyMatchModel - allocs/op
37
allocs/op37
allocs/op1
BenchmarkRBACModelWithDeny - ns/op
6982
ns/op7103
ns/op0.98
BenchmarkRBACModelWithDeny - B/op
2483
B/op2484
B/op1.00
BenchmarkRBACModelWithDeny - allocs/op
49
allocs/op49
allocs/op1
BenchmarkPriorityModel - ns/op
4241
ns/op4310
ns/op0.98
BenchmarkPriorityModel - B/op
1759
B/op1765
B/op1.00
BenchmarkPriorityModel - allocs/op
22
allocs/op22
allocs/op1
BenchmarkRBACModelWithDomainPatternLarge - ns/op
23818
ns/op24622
ns/op0.97
BenchmarkRBACModelWithDomainPatternLarge - B/op
16762
B/op16756
B/op1.00
BenchmarkRBACModelWithDomainPatternLarge - allocs/op
164
allocs/op164
allocs/op1
BenchmarkRoleManagerSmall - ns/op
69717
ns/op70429
ns/op0.99
BenchmarkRoleManagerSmall - B/op
11955
B/op11955
B/op1
BenchmarkRoleManagerSmall - allocs/op
797
allocs/op797
allocs/op1
BenchmarkRoleManagerMedium - ns/op
741601
ns/op755138
ns/op0.98
BenchmarkRoleManagerMedium - B/op
125914
B/op125915
B/op1.00
BenchmarkRoleManagerMedium - allocs/op
8741
allocs/op8741
allocs/op1
BenchmarkRoleManagerLarge - ns/op
8214236
ns/op9329911
ns/op0.88
BenchmarkRoleManagerLarge - B/op
1349923
B/op1349925
B/op1.00
BenchmarkRoleManagerLarge - allocs/op
89741
allocs/op89741
allocs/op1
BenchmarkBuildRoleLinksWithPatternLarge - ns/op
6040649458
ns/op6212283114
ns/op0.97
BenchmarkBuildRoleLinksWithPatternLarge - B/op
5350679168
B/op5348304072
B/op1.00
BenchmarkBuildRoleLinksWithPatternLarge - allocs/op
60950665
allocs/op60949962
allocs/op1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge - ns/op
163583356
ns/op169952935
ns/op0.96
BenchmarkBuildRoleLinksWithDomainPatternLarge - B/op
141030638
B/op141455876
B/op1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge - allocs/op
1676469
allocs/op1676533
allocs/op1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - ns/op
6200676971
ns/op6435645526
ns/op0.96
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - B/op
5472251672
B/op5483027224
B/op1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - allocs/op
62557899
allocs/op62559972
allocs/op1.00
BenchmarkHasLinkWithPatternLarge - ns/op
11049
ns/op10668
ns/op1.04
BenchmarkHasLinkWithPatternLarge - B/op
7599
B/op7603
B/op1.00
BenchmarkHasLinkWithPatternLarge - allocs/op
111
allocs/op111
allocs/op1
BenchmarkHasLinkWithDomainPatternLarge - ns/op
498.3
ns/op497.3
ns/op1.00
BenchmarkHasLinkWithDomainPatternLarge - B/op
80
B/op80
B/op1
BenchmarkHasLinkWithDomainPatternLarge - allocs/op
5
allocs/op5
allocs/op1
BenchmarkHasLinkWithPatternAndDomainPatternLarge - ns/op
10253
ns/op10322
ns/op0.99
BenchmarkHasLinkWithPatternAndDomainPatternLarge - B/op
7602
B/op7612
B/op1.00
BenchmarkHasLinkWithPatternAndDomainPatternLarge - allocs/op
111
allocs/op111
allocs/op1
This comment was automatically generated by workflow using github-action-benchmark.