Skip to content

Commit

Permalink
feat: CachedEnforcer does not clean the result cached in memory when …
Browse files Browse the repository at this point in the history
…call ClearPolicy method (#1413)

* fix: CachedEnforcer does not clean the result cached in memory when call ClearPolicy method

* fix: remove redundant return statement
  • Loading branch information
cococolanosugar committed Jun 17, 2024
1 parent 963e1c4 commit 71c8c84
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 0 deletions.
11 changes: 11 additions & 0 deletions enforcer_cached.go
Original file line number Diff line number Diff line change
Expand Up @@ -172,3 +172,14 @@ func GetCacheKey(params ...interface{}) (string, bool) {
}
return key.String(), true
}

// ClearPolicy clears all policy.
func (e *CachedEnforcer) ClearPolicy() {
if atomic.LoadInt32(&e.enableCache) != 0 {
if err := e.cache.Clear(); err != nil {
e.logger.LogError(err, "clear cache failed")
return
}
}
e.Enforcer.ClearPolicy()
}
13 changes: 13 additions & 0 deletions enforcer_cached_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,17 @@ func TestCache(t *testing.T) {
testEnforceCache(t, e, "bob", "data2", "write", false)
testEnforceCache(t, e, "alice", "data2", "read", true)
testEnforceCache(t, e, "alice", "data2", "write", true)

e, _ = NewCachedEnforcer("examples/rbac_model.conf", "examples/rbac_policy.csv")
testEnforceCache(t, e, "alice", "data1", "read", true)
testEnforceCache(t, e, "bob", "data2", "write", true)
testEnforceCache(t, e, "alice", "data2", "read", true)
testEnforceCache(t, e, "alice", "data2", "write", true)

e.ClearPolicy()

testEnforceCache(t, e, "alice", "data1", "read", false)
testEnforceCache(t, e, "bob", "data2", "write", false)
testEnforceCache(t, e, "alice", "data2", "read", false)
testEnforceCache(t, e, "alice", "data2", "write", false)
}

1 comment on commit 71c8c84

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 71c8c84 Previous: 963e1c4 Ratio
BenchmarkCachedRaw 17.51 ns/op 0 B/op 0 allocs/op 17.54 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkCachedRaw - ns/op 17.51 ns/op 17.54 ns/op 1.00
BenchmarkCachedRaw - B/op 0 B/op 0 B/op 1
BenchmarkCachedRaw - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkCachedBasicModel 171.7 ns/op 104 B/op 4 allocs/op 168.8 ns/op 104 B/op 4 allocs/op 1.02
BenchmarkCachedBasicModel - ns/op 171.7 ns/op 168.8 ns/op 1.02
BenchmarkCachedBasicModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedBasicModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModel 171 ns/op 104 B/op 4 allocs/op 167.9 ns/op 104 B/op 4 allocs/op 1.02
BenchmarkCachedRBACModel - ns/op 171 ns/op 167.9 ns/op 1.02
BenchmarkCachedRBACModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelSmall 180.9 ns/op 104 B/op 4 allocs/op 176.2 ns/op 104 B/op 4 allocs/op 1.03
BenchmarkCachedRBACModelSmall - ns/op 180.9 ns/op 176.2 ns/op 1.03
BenchmarkCachedRBACModelSmall - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelSmall - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelMedium 190.4 ns/op 104 B/op 4 allocs/op 179.5 ns/op 104 B/op 4 allocs/op 1.06
BenchmarkCachedRBACModelMedium - ns/op 190.4 ns/op 179.5 ns/op 1.06
BenchmarkCachedRBACModelMedium - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelMedium - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelLarge 158 ns/op 96 B/op 3 allocs/op 157.2 ns/op 96 B/op 3 allocs/op 1.01
BenchmarkCachedRBACModelLarge - ns/op 158 ns/op 157.2 ns/op 1.01
BenchmarkCachedRBACModelLarge - B/op 96 B/op 96 B/op 1
BenchmarkCachedRBACModelLarge - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkCachedRBACModelWithResourceRoles 172.1 ns/op 104 B/op 4 allocs/op 170.4 ns/op 104 B/op 4 allocs/op 1.01
BenchmarkCachedRBACModelWithResourceRoles - ns/op 172.1 ns/op 170.4 ns/op 1.01
BenchmarkCachedRBACModelWithResourceRoles - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelWithResourceRoles - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelWithDomains 184.7 ns/op 120 B/op 4 allocs/op 180.6 ns/op 120 B/op 4 allocs/op 1.02
BenchmarkCachedRBACModelWithDomains - ns/op 184.7 ns/op 180.6 ns/op 1.02
BenchmarkCachedRBACModelWithDomains - B/op 120 B/op 120 B/op 1
BenchmarkCachedRBACModelWithDomains - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedABACModel 2862 ns/op 1543 B/op 18 allocs/op 2805 ns/op 1540 B/op 18 allocs/op 1.02
BenchmarkCachedABACModel - ns/op 2862 ns/op 2805 ns/op 1.02
BenchmarkCachedABACModel - B/op 1543 B/op 1540 B/op 1.00
BenchmarkCachedABACModel - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkCachedKeyMatchModel 190.4 ns/op 152 B/op 4 allocs/op 188.2 ns/op 152 B/op 4 allocs/op 1.01
BenchmarkCachedKeyMatchModel - ns/op 190.4 ns/op 188.2 ns/op 1.01
BenchmarkCachedKeyMatchModel - B/op 152 B/op 152 B/op 1
BenchmarkCachedKeyMatchModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelWithDeny 172.7 ns/op 104 B/op 4 allocs/op 171.8 ns/op 104 B/op 4 allocs/op 1.01
BenchmarkCachedRBACModelWithDeny - ns/op 172.7 ns/op 171.8 ns/op 1.01
BenchmarkCachedRBACModelWithDeny - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelWithDeny - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedPriorityModel 172.5 ns/op 104 B/op 4 allocs/op 169.1 ns/op 104 B/op 4 allocs/op 1.02
BenchmarkCachedPriorityModel - ns/op 172.5 ns/op 169.1 ns/op 1.02
BenchmarkCachedPriorityModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedPriorityModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedWithEnforceContext 303 ns/op 240 B/op 5 allocs/op 301.2 ns/op 240 B/op 5 allocs/op 1.01
BenchmarkCachedWithEnforceContext - ns/op 303 ns/op 301.2 ns/op 1.01
BenchmarkCachedWithEnforceContext - B/op 240 B/op 240 B/op 1
BenchmarkCachedWithEnforceContext - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkCachedRBACModelMediumParallel 161.1 ns/op 105 B/op 4 allocs/op 171.8 ns/op 105 B/op 4 allocs/op 0.94
BenchmarkCachedRBACModelMediumParallel - ns/op 161.1 ns/op 171.8 ns/op 0.94
BenchmarkCachedRBACModelMediumParallel - B/op 105 B/op 105 B/op 1
BenchmarkCachedRBACModelMediumParallel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkHasPolicySmall 536.2 ns/op 150 B/op 6 allocs/op 522.5 ns/op 150 B/op 6 allocs/op 1.03
BenchmarkHasPolicySmall - ns/op 536.2 ns/op 522.5 ns/op 1.03
BenchmarkHasPolicySmall - B/op 150 B/op 150 B/op 1
BenchmarkHasPolicySmall - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkHasPolicyMedium 541.4 ns/op 157 B/op 6 allocs/op 574.5 ns/op 157 B/op 6 allocs/op 0.94
BenchmarkHasPolicyMedium - ns/op 541.4 ns/op 574.5 ns/op 0.94
BenchmarkHasPolicyMedium - B/op 157 B/op 157 B/op 1
BenchmarkHasPolicyMedium - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkHasPolicyLarge 578.8 ns/op 165 B/op 7 allocs/op 606.2 ns/op 165 B/op 7 allocs/op 0.95
BenchmarkHasPolicyLarge - ns/op 578.8 ns/op 606.2 ns/op 0.95
BenchmarkHasPolicyLarge - B/op 165 B/op 165 B/op 1
BenchmarkHasPolicyLarge - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkAddPolicySmall 587.4 ns/op 152 B/op 6 allocs/op 537.1 ns/op 152 B/op 6 allocs/op 1.09
BenchmarkAddPolicySmall - ns/op 587.4 ns/op 537.1 ns/op 1.09
BenchmarkAddPolicySmall - B/op 152 B/op 152 B/op 1
BenchmarkAddPolicySmall - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkAddPolicyMedium 609.3 ns/op 169 B/op 7 allocs/op 582.9 ns/op 168 B/op 7 allocs/op 1.05
BenchmarkAddPolicyMedium - ns/op 609.3 ns/op 582.9 ns/op 1.05
BenchmarkAddPolicyMedium - B/op 169 B/op 168 B/op 1.01
BenchmarkAddPolicyMedium - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkAddPolicyLarge 1150 ns/op 447 B/op 9 allocs/op 1282 ns/op 456 B/op 9 allocs/op 0.90
BenchmarkAddPolicyLarge - ns/op 1150 ns/op 1282 ns/op 0.90
BenchmarkAddPolicyLarge - B/op 447 B/op 456 B/op 0.98
BenchmarkAddPolicyLarge - allocs/op 9 allocs/op 9 allocs/op 1
BenchmarkRemovePolicySmall 556 ns/op 166 B/op 7 allocs/op 550.4 ns/op 166 B/op 7 allocs/op 1.01
BenchmarkRemovePolicySmall - ns/op 556 ns/op 550.4 ns/op 1.01
BenchmarkRemovePolicySmall - B/op 166 B/op 166 B/op 1
BenchmarkRemovePolicySmall - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkRemovePolicyMedium 575.5 ns/op 175 B/op 7 allocs/op 562.7 ns/op 175 B/op 7 allocs/op 1.02
BenchmarkRemovePolicyMedium - ns/op 575.5 ns/op 562.7 ns/op 1.02
BenchmarkRemovePolicyMedium - B/op 175 B/op 175 B/op 1
BenchmarkRemovePolicyMedium - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkRemovePolicyLarge 1200 ns/op 280 B/op 12 allocs/op 1233 ns/op 285 B/op 13 allocs/op 0.97
BenchmarkRemovePolicyLarge - ns/op 1200 ns/op 1233 ns/op 0.97
BenchmarkRemovePolicyLarge - B/op 280 B/op 285 B/op 0.98
BenchmarkRemovePolicyLarge - allocs/op 12 allocs/op 13 allocs/op 0.92
BenchmarkRaw 17.46 ns/op 0 B/op 0 allocs/op 17.54 ns/op 0 B/op 0 allocs/op 1.00
BenchmarkRaw - ns/op 17.46 ns/op 17.54 ns/op 1.00
BenchmarkRaw - B/op 0 B/op 0 B/op 1
BenchmarkRaw - allocs/op 0 allocs/op 0 allocs/op 1
BenchmarkBasicModel 3759 ns/op 1508 B/op 17 allocs/op 3605 ns/op 1509 B/op 17 allocs/op 1.04
BenchmarkBasicModel - ns/op 3759 ns/op 3605 ns/op 1.04
BenchmarkBasicModel - B/op 1508 B/op 1509 B/op 1.00
BenchmarkBasicModel - allocs/op 17 allocs/op 17 allocs/op 1
BenchmarkRBACModel 5406 ns/op 2066 B/op 35 allocs/op 5508 ns/op 2066 B/op 35 allocs/op 0.98
BenchmarkRBACModel - ns/op 5406 ns/op 5508 ns/op 0.98
BenchmarkRBACModel - B/op 2066 B/op 2066 B/op 1
BenchmarkRBACModel - allocs/op 35 allocs/op 35 allocs/op 1
BenchmarkRBACModelSizes/small 51357 ns/op 20274 B/op 480 allocs/op 49137 ns/op 20265 B/op 480 allocs/op 1.05
BenchmarkRBACModelSizes/small - ns/op 51357 ns/op 49137 ns/op 1.05
BenchmarkRBACModelSizes/small - B/op 20274 B/op 20265 B/op 1.00
BenchmarkRBACModelSizes/small - allocs/op 480 allocs/op 480 allocs/op 1
BenchmarkRBACModelSizes/medium 501478 ns/op 191673 B/op 4828 allocs/op 494595 ns/op 191741 B/op 4829 allocs/op 1.01
BenchmarkRBACModelSizes/medium - ns/op 501478 ns/op 494595 ns/op 1.01
BenchmarkRBACModelSizes/medium - B/op 191673 B/op 191741 B/op 1.00
BenchmarkRBACModelSizes/medium - allocs/op 4828 allocs/op 4829 allocs/op 1.00
BenchmarkRBACModelSizes/large 5384829 ns/op 1898883 B/op 48147 allocs/op 5349307 ns/op 1898653 B/op 48149 allocs/op 1.01
BenchmarkRBACModelSizes/large - ns/op 5384829 ns/op 5349307 ns/op 1.01
BenchmarkRBACModelSizes/large - B/op 1898883 B/op 1898653 B/op 1.00
BenchmarkRBACModelSizes/large - allocs/op 48147 allocs/op 48149 allocs/op 1.00
BenchmarkRBACModelSmall 61078 ns/op 20307 B/op 615 allocs/op 58926 ns/op 20370 B/op 615 allocs/op 1.04
BenchmarkRBACModelSmall - ns/op 61078 ns/op 58926 ns/op 1.04
BenchmarkRBACModelSmall - B/op 20307 B/op 20370 B/op 1.00
BenchmarkRBACModelSmall - allocs/op 615 allocs/op 615 allocs/op 1
BenchmarkRBACModelMedium 569566 ns/op 194618 B/op 6018 allocs/op 578442 ns/op 194635 B/op 6018 allocs/op 0.98
BenchmarkRBACModelMedium - ns/op 569566 ns/op 578442 ns/op 0.98
BenchmarkRBACModelMedium - B/op 194618 B/op 194635 B/op 1.00
BenchmarkRBACModelMedium - allocs/op 6018 allocs/op 6018 allocs/op 1
BenchmarkRBACModelLarge 6054414 ns/op 1933406 B/op 60306 allocs/op 5998936 ns/op 1933373 B/op 60305 allocs/op 1.01
BenchmarkRBACModelLarge - ns/op 6054414 ns/op 5998936 ns/op 1.01
BenchmarkRBACModelLarge - B/op 1933406 B/op 1933373 B/op 1.00
BenchmarkRBACModelLarge - allocs/op 60306 allocs/op 60305 allocs/op 1.00
BenchmarkRBACModelWithResourceRoles 5502 ns/op 2737 B/op 28 allocs/op 5276 ns/op 2736 B/op 28 allocs/op 1.04
BenchmarkRBACModelWithResourceRoles - ns/op 5502 ns/op 5276 ns/op 1.04
BenchmarkRBACModelWithResourceRoles - B/op 2737 B/op 2736 B/op 1.00
BenchmarkRBACModelWithResourceRoles - allocs/op 28 allocs/op 28 allocs/op 1
BenchmarkRBACModelWithDomains 5108 ns/op 1831 B/op 25 allocs/op 5002 ns/op 1828 B/op 25 allocs/op 1.02
BenchmarkRBACModelWithDomains - ns/op 5108 ns/op 5002 ns/op 1.02
BenchmarkRBACModelWithDomains - B/op 1831 B/op 1828 B/op 1.00
BenchmarkRBACModelWithDomains - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkABACModel 2853 ns/op 1537 B/op 17 allocs/op 2773 ns/op 1535 B/op 17 allocs/op 1.03
BenchmarkABACModel - ns/op 2853 ns/op 2773 ns/op 1.03
BenchmarkABACModel - B/op 1537 B/op 1535 B/op 1.00
BenchmarkABACModel - allocs/op 17 allocs/op 17 allocs/op 1
BenchmarkABACRuleModel 4012227 ns/op 1327547 B/op 40092 allocs/op 3901387 ns/op 1325432 B/op 40092 allocs/op 1.03
BenchmarkABACRuleModel - ns/op 4012227 ns/op 3901387 ns/op 1.03
BenchmarkABACRuleModel - B/op 1327547 B/op 1325432 B/op 1.00
BenchmarkABACRuleModel - allocs/op 40092 allocs/op 40092 allocs/op 1
BenchmarkKeyMatchModel 6169 ns/op 3070 B/op 37 allocs/op 6076 ns/op 3068 B/op 37 allocs/op 1.02
BenchmarkKeyMatchModel - ns/op 6169 ns/op 6076 ns/op 1.02
BenchmarkKeyMatchModel - B/op 3070 B/op 3068 B/op 1.00
BenchmarkKeyMatchModel - allocs/op 37 allocs/op 37 allocs/op 1
BenchmarkRBACModelWithDeny 7028 ns/op 2486 B/op 49 allocs/op 6866 ns/op 2481 B/op 49 allocs/op 1.02
BenchmarkRBACModelWithDeny - ns/op 7028 ns/op 6866 ns/op 1.02
BenchmarkRBACModelWithDeny - B/op 2486 B/op 2481 B/op 1.00
BenchmarkRBACModelWithDeny - allocs/op 49 allocs/op 49 allocs/op 1
BenchmarkPriorityModel 4214 ns/op 1765 B/op 22 allocs/op 4146 ns/op 1765 B/op 22 allocs/op 1.02
BenchmarkPriorityModel - ns/op 4214 ns/op 4146 ns/op 1.02
BenchmarkPriorityModel - B/op 1765 B/op 1765 B/op 1
BenchmarkPriorityModel - allocs/op 22 allocs/op 22 allocs/op 1
BenchmarkRBACModelWithDomainPatternLarge 23325 ns/op 16738 B/op 164 allocs/op 22369 ns/op 16722 B/op 164 allocs/op 1.04
BenchmarkRBACModelWithDomainPatternLarge - ns/op 23325 ns/op 22369 ns/op 1.04
BenchmarkRBACModelWithDomainPatternLarge - B/op 16738 B/op 16722 B/op 1.00
BenchmarkRBACModelWithDomainPatternLarge - allocs/op 164 allocs/op 164 allocs/op 1
BenchmarkRoleManagerSmall 72070 ns/op 11955 B/op 797 allocs/op 68573 ns/op 11955 B/op 797 allocs/op 1.05
BenchmarkRoleManagerSmall - ns/op 72070 ns/op 68573 ns/op 1.05
BenchmarkRoleManagerSmall - B/op 11955 B/op 11955 B/op 1
BenchmarkRoleManagerSmall - allocs/op 797 allocs/op 797 allocs/op 1
BenchmarkRoleManagerMedium 730149 ns/op 125914 B/op 8741 allocs/op 714073 ns/op 125914 B/op 8741 allocs/op 1.02
BenchmarkRoleManagerMedium - ns/op 730149 ns/op 714073 ns/op 1.02
BenchmarkRoleManagerMedium - B/op 125914 B/op 125914 B/op 1
BenchmarkRoleManagerMedium - allocs/op 8741 allocs/op 8741 allocs/op 1
BenchmarkRoleManagerLarge 7836069 ns/op 1349921 B/op 89741 allocs/op 7722631 ns/op 1349921 B/op 89741 allocs/op 1.01
BenchmarkRoleManagerLarge - ns/op 7836069 ns/op 7722631 ns/op 1.01
BenchmarkRoleManagerLarge - B/op 1349921 B/op 1349921 B/op 1
BenchmarkRoleManagerLarge - allocs/op 89741 allocs/op 89741 allocs/op 1
BenchmarkBuildRoleLinksWithPatternLarge 6100830492 ns/op 5348967480 B/op 60949856 allocs/op 5813094304 ns/op 5322951904 B/op 60944183 allocs/op 1.05
BenchmarkBuildRoleLinksWithPatternLarge - ns/op 6100830492 ns/op 5813094304 ns/op 1.05
BenchmarkBuildRoleLinksWithPatternLarge - B/op 5348967480 B/op 5322951904 B/op 1.00
BenchmarkBuildRoleLinksWithPatternLarge - allocs/op 60949856 allocs/op 60944183 allocs/op 1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge 166042141 ns/op 141653112 B/op 1676506 allocs/op 159623563 ns/op 141020763 B/op 1676378 allocs/op 1.04
BenchmarkBuildRoleLinksWithDomainPatternLarge - ns/op 166042141 ns/op 159623563 ns/op 1.04
BenchmarkBuildRoleLinksWithDomainPatternLarge - B/op 141653112 B/op 141020763 B/op 1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge - allocs/op 1676506 allocs/op 1676378 allocs/op 1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge 6282298314 ns/op 5484342144 B/op 62560166 allocs/op 6013422214 ns/op 5462285056 B/op 62555086 allocs/op 1.04
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - ns/op 6282298314 ns/op 6013422214 ns/op 1.04
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - B/op 5484342144 B/op 5462285056 B/op 1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - allocs/op 62560166 allocs/op 62555086 allocs/op 1.00
BenchmarkHasLinkWithPatternLarge 10424 ns/op 7608 B/op 111 allocs/op 9950 ns/op 7585 B/op 111 allocs/op 1.05
BenchmarkHasLinkWithPatternLarge - ns/op 10424 ns/op 9950 ns/op 1.05
BenchmarkHasLinkWithPatternLarge - B/op 7608 B/op 7585 B/op 1.00
BenchmarkHasLinkWithPatternLarge - allocs/op 111 allocs/op 111 allocs/op 1
BenchmarkHasLinkWithDomainPatternLarge 496.7 ns/op 80 B/op 5 allocs/op 480.1 ns/op 80 B/op 5 allocs/op 1.03
BenchmarkHasLinkWithDomainPatternLarge - ns/op 496.7 ns/op 480.1 ns/op 1.03
BenchmarkHasLinkWithDomainPatternLarge - B/op 80 B/op 80 B/op 1
BenchmarkHasLinkWithDomainPatternLarge - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkHasLinkWithPatternAndDomainPatternLarge 10419 ns/op 7608 B/op 111 allocs/op 9905 ns/op 7584 B/op 111 allocs/op 1.05
BenchmarkHasLinkWithPatternAndDomainPatternLarge - ns/op 10419 ns/op 9905 ns/op 1.05
BenchmarkHasLinkWithPatternAndDomainPatternLarge - B/op 7608 B/op 7584 B/op 1.00
BenchmarkHasLinkWithPatternAndDomainPatternLarge - allocs/op 111 allocs/op 111 allocs/op 1

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.