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: add key_get series built-in operator #338

Merged
merged 4 commits into from
Sep 2, 2024
Merged

Conversation

MuZhou233
Copy link
Contributor

@MuZhou233 MuZhou233 commented Sep 2, 2024

Fix: #337

API changed: operator function definition changed due to different signature of key_get functions

Copy link

github-actions bot commented Sep 2, 2024

Benchmark for f4c3350

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 16.5±0.21ms 10.3±0.26ms +60.19%
benchmark priority model 5.6±0.14µs 4.3±0.11µs +30.23%
benchmark_abac_model 2.8±0.05µs 2.5±0.04µs +12.00%
benchmark_basic_model 4.9±0.15µs 3.9±0.15µs +25.64%
benchmark_key_match 8.5±0.12µs 7.2±0.20µs +18.06%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 8.6±0.11µs 6.2±0.15µs +38.71%
benchmark_rbac_model_medium 1554.0±21.76µs 858.8±16.30µs +80.95%
benchmark_rbac_model_with_domains 6.9±0.25µs 6.0±0.09µs +15.00%
benchmark_rbac_with_deny 13.1±0.12µs 8.4±0.08µs +55.95%
benchmark_rbac_with_resource_roles 5.6±0.08µs 4.4±0.04µs +27.27%
benchmark_role_manager_large 7.6±0.04ms 4.6±0.01ms +65.22%
benchmark_role_manager_medium 583.5±7.22µs 304.7±3.85µs +91.50%
benchmark_role_manager_small 59.8±1.67µs 29.5±0.44µs +102.71%

Copy link

github-actions bot commented Sep 2, 2024

Benchmark for f4c3350

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.5±0.08ms 10.1±0.03ms +3.96%
benchmark priority model 4.3±0.04µs 4.3±0.05µs 0.00%
benchmark_abac_model 2.6±0.08µs 2.5±0.04µs +4.00%
benchmark_basic_model 3.9±0.03µs 3.9±0.05µs 0.00%
benchmark_key_match 7.2±0.11µs 7.3±0.08µs -1.37%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.3±0.08µs 6.2±0.39µs +1.61%
benchmark_rbac_model_medium 932.3±7.23µs 844.5±28.20µs +10.40%
benchmark_rbac_model_with_domains 6.0±0.05µs 6.0±0.11µs 0.00%
benchmark_rbac_with_deny 8.7±0.05µs 8.7±0.22µs 0.00%
benchmark_rbac_with_resource_roles 4.4±0.03µs 4.4±0.09µs 0.00%
benchmark_role_manager_large 4.6±0.03ms 4.6±0.03ms 0.00%
benchmark_role_manager_medium 300.2±4.33µs 302.4±4.05µs -0.73%
benchmark_role_manager_small 29.1±0.59µs 29.8±0.52µs -2.35%

Copy link

github-actions bot commented Sep 2, 2024

Benchmark for f4c3350

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.2±0.08ms 10.3±0.04ms -0.97%
benchmark priority model 4.4±0.08µs 4.3±0.03µs +2.33%
benchmark_abac_model 2.6±0.06µs 2.5±0.04µs +4.00%
benchmark_basic_model 3.9±0.18µs 3.9±0.06µs 0.00%
benchmark_key_match 7.1±0.08µs 7.1±0.09µs 0.00%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.2±0.14µs 6.3±0.15µs -1.59%
benchmark_rbac_model_medium 878.1±9.74µs 867.9±14.48µs +1.18%
benchmark_rbac_model_with_domains 6.1±0.09µs 6.0±0.20µs +1.67%
benchmark_rbac_with_deny 8.6±0.15µs 9.1±0.15µs -5.49%
benchmark_rbac_with_resource_roles 4.5±0.07µs 4.5±0.08µs 0.00%
benchmark_role_manager_large 4.6±0.04ms 4.6±0.04ms 0.00%
benchmark_role_manager_medium 302.3±4.11µs 302.6±2.67µs -0.10%
benchmark_role_manager_small 29.7±0.40µs 29.6±0.60µs +0.34%

@hsluoyz hsluoyz merged commit b5d3765 into casbin:master Sep 2, 2024
10 checks passed
@waterflier
Copy link

Great, you're so quick! I've been researching these two days and found that adding keyGet functions requires a major adjustment to the add_function system~

Thank you so much for completing it in such a short time

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.

We need support for the keyGet series of functions.
3 participants