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: change mut ref to ref in the parameters of get_roles_for_user and other similar functions. #356

Merged
merged 3 commits into from
Jan 3, 2025

Conversation

liulifox233
Copy link
Contributor

Copy link

github-actions bot commented Jan 3, 2025

Benchmark for c5a05d3

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.1±0.09ms 9.8±0.11ms +3.06%
benchmark priority model 4.1±0.05µs 4.1±0.04µs 0.00%
benchmark_abac_model 2.4±0.03µs 2.4±0.06µs 0.00%
benchmark_basic_model 3.6±0.06µs 3.7±0.04µs -2.70%
benchmark_key_match 6.7±0.21µs 6.7±0.12µs 0.00%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 5.9±0.09µs 5.9±0.09µs 0.00%
benchmark_rbac_model_medium 843.7±18.22µs 836.6±5.98µs +0.85%
benchmark_rbac_model_with_domains 5.8±0.21µs 5.8±0.09µs 0.00%
benchmark_rbac_with_deny 8.3±0.13µs 8.3±0.11µs 0.00%
benchmark_rbac_with_resource_roles 4.2±0.11µs 4.2±0.04µs 0.00%
benchmark_role_manager_large 4.6±0.03ms 4.6±0.01ms 0.00%
benchmark_role_manager_medium 295.7±4.38µs 295.7±5.60µs 0.00%
benchmark_role_manager_small 88.0±2.88µs 89.7±2.40µs -1.90%

Copy link

github-actions bot commented Jan 3, 2025

Benchmark for c5a05d3

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 9.7±0.08ms 9.8±0.20ms -1.02%
benchmark priority model 4.3±0.06µs 4.3±0.07µs 0.00%
benchmark_abac_model 2.4±0.02µs 2.5±0.02µs -4.00%
benchmark_basic_model 3.8±0.05µs 3.8±0.05µs 0.00%
benchmark_key_match 7.0±0.10µs 6.8±0.13µs +2.94%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.3±0.14µs 6.2±0.09µs +1.61%
benchmark_rbac_model_medium 858.7±7.87µs 843.0±9.01µs +1.86%
benchmark_rbac_model_with_domains 6.0±0.08µs 6.0±0.07µs 0.00%
benchmark_rbac_with_deny 8.6±0.92µs 8.4±0.10µs +2.38%
benchmark_rbac_with_resource_roles 4.4±0.08µs 4.4±0.04µs 0.00%
benchmark_role_manager_large 4.6±0.03ms 4.7±0.05ms -2.13%
benchmark_role_manager_medium 299.0±3.55µs 297.7±2.46µs +0.44%
benchmark_role_manager_small 88.6±1.15µs 87.3±0.81µs +1.49%

@hsluoyz hsluoyz merged commit d7c93e8 into casbin:master Jan 3, 2025
9 of 10 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Why does get_roles_for_user take a &mut ref?
2 participants