Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: use map to store policy index #283

Merged
merged 3 commits into from
Jul 13, 2022
Merged

Conversation

imp2002
Copy link
Member

@imp2002 imp2002 commented Jul 12, 2022

Fix: #278

Benchmark previous:
6BI1}X5)~L%H04ZODUS%QTQ

Benchmark current:
GV0{SIT$FQ30 K 9F$23QS1

Signed-off-by: imp2002 <imp07@qq.com>
Signed-off-by: imp2002 <imp07@qq.com>
@casbin-bot
Copy link
Member

@tangyang9464 @seriouszyx @elfisworking please review

@codecov-commenter
Copy link

Codecov Report

Merging #283 (153f172) into master (5f78e43) will increase coverage by 0.41%.
The diff coverage is 97.36%.

@@            Coverage Diff             @@
##           master     #283      +/-   ##
==========================================
+ Coverage   66.33%   66.75%   +0.41%     
==========================================
  Files          45       45              
  Lines        2225     2262      +37     
  Branches      388      394       +6     
==========================================
+ Hits         1476     1510      +34     
+ Misses        636      633       -3     
- Partials      113      119       +6     
Impacted Files Coverage Δ
src/main/java/org/casbin/jcasbin/model/Model.java 100.00% <ø> (ø)
src/main/java/org/casbin/jcasbin/model/Policy.java 78.43% <96.42%> (+1.18%) ⬆️
.../main/java/org/casbin/jcasbin/model/Assertion.java 73.91% <100.00%> (+0.57%) ⬆️
...c/main/java/org/casbin/jcasbin/persist/Helper.java 76.92% <100.00%> (+6.92%) ⬆️
src/main/java/org/casbin/jcasbin/util/Util.java 61.53% <0.00%> (-6.60%) ⬇️
src/main/java/org/casbin/jcasbin/rbac/Role.java 89.74% <0.00%> (-5.26%) ⬇️
...ain/java/org/casbin/jcasbin/main/CoreEnforcer.java 79.19% <0.00%> (+0.20%) ⬆️
...a/org/casbin/jcasbin/main/DistributedEnforcer.java 33.33% <0.00%> (+0.95%) ⬆️
...va/org/casbin/jcasbin/rbac/DefaultRoleManager.java 83.51% <0.00%> (+4.39%) ⬆️
...java/org/casbin/jcasbin/main/InternalEnforcer.java 50.95% <0.00%> (+5.00%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 5f78e43...153f172. Read the comment docs.

@hsluoyz
Copy link
Member

hsluoyz commented Jul 12, 2022

@tangyang9464

Signed-off-by: imp2002 <imp07@qq.com>
Copy link
Member

@tangyang9464 tangyang9464 left a comment

Choose a reason for hiding this comment

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

LGTM

@hsluoyz hsluoyz merged commit 51d1294 into casbin:master Jul 13, 2022
@github-actions
Copy link

🎉 This PR is included in version 1.25.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

performance: use map to store policy index to insert/remove policy with O(1)
5 participants