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 StringAdapter to file adapter module #344

Closed
wants to merge 2 commits into from
Closed

feat: add StringAdapter to file adapter module #344

wants to merge 2 commits into from

Conversation

sanbei101
Copy link

This pull request introduces a new StringAdapter to handle policy strings directly, along with necessary integrations and updates to the existing codebase. The most important changes include the addition of the StringAdapter struct and its implementation, updates to the adapter module to include the new adapter, and modifications to the main library file to use the new adapter.

Introduction of StringAdapter:

  • src/adapter/file_adapter.rs: Added the StringAdapter struct with methods to load, save, and clear policies from a string, and implemented the Adapter trait for it.

Module updates:

Library updates:

  • src/lib.rs: Modified to conditionally export StringAdapter along with other adapters.

Copy link

github-actions bot commented Oct 6, 2024

Benchmark for c5a05d3

Click to view benchmark
Test PR Benchmark Master Benchmark %
b_benchmark_rbac_model_large 10.3±0.10ms 10.4±0.12ms -0.96%
benchmark priority model 4.3±0.08µs 4.3±0.08µs 0.00%
benchmark_abac_model 2.6±0.05µs 2.6±0.10µs 0.00%
benchmark_basic_model 3.9±0.07µs 3.9±0.04µs 0.00%
benchmark_key_match 7.3±0.15µs 7.2±0.09µs +1.39%
benchmark_raw 0.0±0.00ns 0.0±0.00ns NaN%
benchmark_rbac_model 6.5±0.15µs 6.2±0.06µs +4.84%
benchmark_rbac_model_medium 910.7±11.30µs 914.7±14.55µs -0.44%
benchmark_rbac_model_with_domains 6.1±0.10µs 6.1±0.11µs 0.00%
benchmark_rbac_with_deny 8.8±0.15µs 9.1±0.11µs -3.30%
benchmark_rbac_with_resource_roles 4.5±0.11µs 4.5±0.09µs 0.00%
benchmark_role_manager_large 4.6±0.03ms 4.6±0.26ms 0.00%
benchmark_role_manager_medium 308.9±3.22µs 305.4±3.18µs +1.15%
benchmark_role_manager_small 94.2±1.09µs 91.9±1.66µs +2.50%

@hsluoyz hsluoyz closed this Oct 6, 2024
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.

2 participants