Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
nomeguy committed Dec 19, 2023
1 parent 953c551 commit 9682630
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,20 @@ Casbin

Casbin is a powerful and efficient open-source access control library for Golang projects. It provides support for enforcing authorization based on various [access control models](https://en.wikipedia.org/wiki/Computer_security_model).

<p align="center">
<sup>Sponsored by</sup>
<br>
<a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_campaign=casbin">
<picture>
<source media="(prefers-color-scheme: dark)" srcset="https://cdn.casbin.org/img/stytch-white.png">
<source media="(prefers-color-scheme: light)" srcset="https://cdn.casbin.org/img/stytch-charcoal.png">
<img src="https://cdn.casbin.org/img/stytch-charcoal.png" width="275">
</picture>
</a><br/>
<a href="https://stytch.com/docs?utm_source=oss-sponsorship&utm_medium=paid_sponsorship&utm_campaign=casbin"><b>Build auth with fraud prevention, faster.</b><br/> Try Stytch for API-first authentication, user & org management, multi-tenant SSO, MFA, device fingerprinting, and more.</a>
<br>
</p>

## All the languages supported by Casbin:

| [![golang](https://casbin.org/img/langs/golang.png)](https://github.com/casbin/casbin) | [![java](https://casbin.org/img/langs/java.png)](https://github.com/casbin/jcasbin) | [![nodejs](https://casbin.org/img/langs/nodejs.png)](https://github.com/casbin/node-casbin) | [![php](https://casbin.org/img/langs/php.png)](https://github.com/php-casbin/php-casbin) |
Expand Down

1 comment on commit 9682630

@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: 9682630 Previous: 953c551 Ratio
BenchmarkCachedRaw - ns/op 17.55 ns/op 17.51 ns/op 1.00
BenchmarkCachedRaw - B/op 0 B/op 0 B/op NaN
BenchmarkCachedRaw - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkCachedBasicModel - ns/op 166.5 ns/op 165.8 ns/op 1.00
BenchmarkCachedBasicModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedBasicModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModel - ns/op 164.9 ns/op 165.6 ns/op 1.00
BenchmarkCachedRBACModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelSmall - ns/op 174.9 ns/op 175.9 ns/op 0.99
BenchmarkCachedRBACModelSmall - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelSmall - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelMedium - ns/op 178 ns/op 181.8 ns/op 0.98
BenchmarkCachedRBACModelMedium - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelMedium - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelLarge - ns/op 161.8 ns/op 166.6 ns/op 0.97
BenchmarkCachedRBACModelLarge - B/op 96 B/op 96 B/op 1
BenchmarkCachedRBACModelLarge - allocs/op 3 allocs/op 3 allocs/op 1
BenchmarkCachedRBACModelWithResourceRoles - ns/op 162.6 ns/op 165.9 ns/op 0.98
BenchmarkCachedRBACModelWithResourceRoles - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelWithResourceRoles - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelWithDomains - ns/op 177.1 ns/op 175 ns/op 1.01
BenchmarkCachedRBACModelWithDomains - B/op 120 B/op 120 B/op 1
BenchmarkCachedRBACModelWithDomains - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedABACModel - ns/op 2850 ns/op 2905 ns/op 0.98
BenchmarkCachedABACModel - B/op 1536 B/op 1541 B/op 1.00
BenchmarkCachedABACModel - allocs/op 18 allocs/op 18 allocs/op 1
BenchmarkCachedKeyMatchModel - ns/op 178.9 ns/op 182.5 ns/op 0.98
BenchmarkCachedKeyMatchModel - B/op 152 B/op 152 B/op 1
BenchmarkCachedKeyMatchModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedRBACModelWithDeny - ns/op 163.7 ns/op 166.7 ns/op 0.98
BenchmarkCachedRBACModelWithDeny - B/op 104 B/op 104 B/op 1
BenchmarkCachedRBACModelWithDeny - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedPriorityModel - ns/op 170.4 ns/op 170 ns/op 1.00
BenchmarkCachedPriorityModel - B/op 104 B/op 104 B/op 1
BenchmarkCachedPriorityModel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkCachedWithEnforceContext - ns/op 304.5 ns/op 307.7 ns/op 0.99
BenchmarkCachedWithEnforceContext - B/op 240 B/op 240 B/op 1
BenchmarkCachedWithEnforceContext - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkCachedRBACModelMediumParallel - ns/op 169.8 ns/op 167.4 ns/op 1.01
BenchmarkCachedRBACModelMediumParallel - B/op 106 B/op 106 B/op 1
BenchmarkCachedRBACModelMediumParallel - allocs/op 4 allocs/op 4 allocs/op 1
BenchmarkHasPolicySmall - ns/op 438.2 ns/op 449.3 ns/op 0.98
BenchmarkHasPolicySmall - B/op 150 B/op 150 B/op 1
BenchmarkHasPolicySmall - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkHasPolicyMedium - ns/op 469.4 ns/op 480.6 ns/op 0.98
BenchmarkHasPolicyMedium - B/op 157 B/op 157 B/op 1
BenchmarkHasPolicyMedium - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkHasPolicyLarge - ns/op 511.8 ns/op 502.2 ns/op 1.02
BenchmarkHasPolicyLarge - B/op 165 B/op 165 B/op 1
BenchmarkHasPolicyLarge - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkAddPolicySmall - ns/op 471.5 ns/op 473.5 ns/op 1.00
BenchmarkAddPolicySmall - B/op 152 B/op 152 B/op 1
BenchmarkAddPolicySmall - allocs/op 6 allocs/op 6 allocs/op 1
BenchmarkAddPolicyMedium - ns/op 536.2 ns/op 549.4 ns/op 0.98
BenchmarkAddPolicyMedium - B/op 172 B/op 172 B/op 1
BenchmarkAddPolicyMedium - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkAddPolicyLarge - ns/op 1157 ns/op 1116 ns/op 1.04
BenchmarkAddPolicyLarge - B/op 473 B/op 473 B/op 1
BenchmarkAddPolicyLarge - allocs/op 9 allocs/op 9 allocs/op 1
BenchmarkRemovePolicySmall - ns/op 491.2 ns/op 503.9 ns/op 0.97
BenchmarkRemovePolicySmall - B/op 166 B/op 166 B/op 1
BenchmarkRemovePolicySmall - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkRemovePolicyMedium - ns/op 531 ns/op 556 ns/op 0.96
BenchmarkRemovePolicyMedium - B/op 176 B/op 176 B/op 1
BenchmarkRemovePolicyMedium - allocs/op 7 allocs/op 7 allocs/op 1
BenchmarkRemovePolicyLarge - ns/op 1330 ns/op 1257 ns/op 1.06
BenchmarkRemovePolicyLarge - B/op 295 B/op 283 B/op 1.04
BenchmarkRemovePolicyLarge - allocs/op 13 allocs/op 12 allocs/op 1.08
BenchmarkRaw - ns/op 17.61 ns/op 17.51 ns/op 1.01
BenchmarkRaw - B/op 0 B/op 0 B/op NaN
BenchmarkRaw - allocs/op 0 allocs/op 0 allocs/op NaN
BenchmarkBasicModel - ns/op 3633 ns/op 3636 ns/op 1.00
BenchmarkBasicModel - B/op 1501 B/op 1506 B/op 1.00
BenchmarkBasicModel - allocs/op 17 allocs/op 17 allocs/op 1
BenchmarkRBACModel - ns/op 5434 ns/op 5494 ns/op 0.99
BenchmarkRBACModel - B/op 2051 B/op 2062 B/op 0.99
BenchmarkRBACModel - allocs/op 35 allocs/op 35 allocs/op 1
BenchmarkRBACModelSizes/small - ns/op 46628 ns/op 47369 ns/op 0.98
BenchmarkRBACModelSizes/small - B/op 20092 B/op 20170 B/op 1.00
BenchmarkRBACModelSizes/small - allocs/op 480 allocs/op 480 allocs/op 1
BenchmarkRBACModelSizes/medium - ns/op 483379 ns/op 496395 ns/op 0.97
BenchmarkRBACModelSizes/medium - B/op 191219 B/op 191741 B/op 1.00
BenchmarkRBACModelSizes/medium - allocs/op 4828 allocs/op 4829 allocs/op 1.00
BenchmarkRBACModelSizes/large - ns/op 5200851 ns/op 5279219 ns/op 0.99
BenchmarkRBACModelSizes/large - B/op 1901769 B/op 1901542 B/op 1.00
BenchmarkRBACModelSizes/large - allocs/op 48228 allocs/op 48213 allocs/op 1.00
BenchmarkRBACModelSmall - ns/op 57585 ns/op 57717 ns/op 1.00
BenchmarkRBACModelSmall - B/op 20178 B/op 20291 B/op 0.99
BenchmarkRBACModelSmall - allocs/op 615 allocs/op 615 allocs/op 1
BenchmarkRBACModelMedium - ns/op 567656 ns/op 571714 ns/op 0.99
BenchmarkRBACModelMedium - B/op 194030 B/op 194685 B/op 1.00
BenchmarkRBACModelMedium - allocs/op 6021 allocs/op 6021 allocs/op 1
BenchmarkRBACModelLarge - ns/op 6142903 ns/op 6045148 ns/op 1.02
BenchmarkRBACModelLarge - B/op 1940030 B/op 1941339 B/op 1.00
BenchmarkRBACModelLarge - allocs/op 60602 allocs/op 60608 allocs/op 1.00
BenchmarkRBACModelWithResourceRoles - ns/op 4549 ns/op 4590 ns/op 0.99
BenchmarkRBACModelWithResourceRoles - B/op 1835 B/op 1843 B/op 1.00
BenchmarkRBACModelWithResourceRoles - allocs/op 27 allocs/op 27 allocs/op 1
BenchmarkRBACModelWithDomains - ns/op 5068 ns/op 5139 ns/op 0.99
BenchmarkRBACModelWithDomains - B/op 1817 B/op 1822 B/op 1.00
BenchmarkRBACModelWithDomains - allocs/op 25 allocs/op 25 allocs/op 1
BenchmarkABACModel - ns/op 2826 ns/op 2834 ns/op 1.00
BenchmarkABACModel - B/op 1527 B/op 1531 B/op 1.00
BenchmarkABACModel - allocs/op 17 allocs/op 17 allocs/op 1
BenchmarkABACRuleModel - ns/op 3870260 ns/op 3890511 ns/op 0.99
BenchmarkABACRuleModel - B/op 1313453 B/op 1320609 B/op 0.99
BenchmarkABACRuleModel - allocs/op 40089 allocs/op 40091 allocs/op 1.00
BenchmarkKeyMatchModel - ns/op 6030 ns/op 6130 ns/op 0.98
BenchmarkKeyMatchModel - B/op 3045 B/op 3064 B/op 0.99
BenchmarkKeyMatchModel - allocs/op 37 allocs/op 37 allocs/op 1
BenchmarkRBACModelWithDeny - ns/op 6839 ns/op 7000 ns/op 0.98
BenchmarkRBACModelWithDeny - B/op 2463 B/op 2474 B/op 1.00
BenchmarkRBACModelWithDeny - allocs/op 49 allocs/op 49 allocs/op 1
BenchmarkPriorityModel - ns/op 4241 ns/op 4200 ns/op 1.01
BenchmarkPriorityModel - B/op 1752 B/op 1757 B/op 1.00
BenchmarkPriorityModel - allocs/op 22 allocs/op 22 allocs/op 1
BenchmarkRBACModelWithDomainPatternLarge - ns/op 22943 ns/op 22991 ns/op 1.00
BenchmarkRBACModelWithDomainPatternLarge - B/op 16702 B/op 16705 B/op 1.00
BenchmarkRBACModelWithDomainPatternLarge - allocs/op 164 allocs/op 164 allocs/op 1
BenchmarkRoleManagerSmall - ns/op 69246 ns/op 69768 ns/op 0.99
BenchmarkRoleManagerSmall - B/op 11954 B/op 11954 B/op 1
BenchmarkRoleManagerSmall - allocs/op 797 allocs/op 797 allocs/op 1
BenchmarkRoleManagerMedium - ns/op 730483 ns/op 736714 ns/op 0.99
BenchmarkRoleManagerMedium - B/op 125914 B/op 125915 B/op 1.00
BenchmarkRoleManagerMedium - allocs/op 8741 allocs/op 8741 allocs/op 1
BenchmarkRoleManagerLarge - ns/op 8442428 ns/op 8285580 ns/op 1.02
BenchmarkRoleManagerLarge - B/op 1349926 B/op 1349926 B/op 1
BenchmarkRoleManagerLarge - allocs/op 89741 allocs/op 89741 allocs/op 1
BenchmarkBuildRoleLinksWithPatternLarge - ns/op 5651609100 ns/op 5937835409 ns/op 0.95
BenchmarkBuildRoleLinksWithPatternLarge - B/op 5320382720 B/op 5335847336 B/op 1.00
BenchmarkBuildRoleLinksWithPatternLarge - allocs/op 60943703 allocs/op 60947073 allocs/op 1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge - ns/op 157609263 ns/op 160150213 ns/op 0.98
BenchmarkBuildRoleLinksWithDomainPatternLarge - B/op 140639131 B/op 141139862 B/op 1.00
BenchmarkBuildRoleLinksWithDomainPatternLarge - allocs/op 1676364 allocs/op 1676456 allocs/op 1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - ns/op 5848098355 ns/op 6130166912 ns/op 0.95
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - B/op 5460752040 B/op 5473784224 B/op 1.00
BenchmarkBuildRoleLinksWithPatternAndDomainPatternLarge - allocs/op 62554788 allocs/op 62557797 allocs/op 1.00
BenchmarkHasLinkWithPatternLarge - ns/op 9873 ns/op 10376 ns/op 0.95
BenchmarkHasLinkWithPatternLarge - B/op 7589 B/op 7599 B/op 1.00
BenchmarkHasLinkWithPatternLarge - allocs/op 111 allocs/op 111 allocs/op 1
BenchmarkHasLinkWithDomainPatternLarge - ns/op 488.6 ns/op 485.6 ns/op 1.01
BenchmarkHasLinkWithDomainPatternLarge - B/op 80 B/op 80 B/op 1
BenchmarkHasLinkWithDomainPatternLarge - allocs/op 5 allocs/op 5 allocs/op 1
BenchmarkHasLinkWithPatternAndDomainPatternLarge - ns/op 9850 ns/op 10113 ns/op 0.97
BenchmarkHasLinkWithPatternAndDomainPatternLarge - B/op 7584 B/op 7604 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.