casbin / casbin-rs

An authorization library that supports access control models like ACL, RBAC, ABAC in Rust.
https://casbin.org
Apache License 2.0
829 stars 67 forks source link

feat: Delete previous benchmark library libtest dependency #248

Closed 0xethsign closed 3 years ago

0xethsign commented 3 years ago

The sole purpose of this PR is to delete the previous benchmark. The reason is - On every pull request, the github actions for criterion compares the benchmark of the master branch and the pull request commits. https://github.com/boa-dev/criterion-compare-action/tree/move_to_actions runs cargo commands that don't run on the rust nightly toolchains. On the other hand, the existing benchmark library runs on the nightly toolchain. Thus the CI fails when comparing the both - https://github.com/casbin/casbin-rs/pull/242/checks?check_run_id=2285035133.

git checkout master
Previous HEAD position was 5f8f8b0 Merge 968da71db3f903d9ed108f2a1a039cfa650ed59c into 5ee0e109a2ca4b894a4486f4a1d83f1f2d70d483
Switched to a new branch 'master'
Branch 'master' set up to track remote branch 'master' from 'origin'.
cargo bench -- --save-baseline master
   Compiling num-traits v0.2.14
   Compiling rhai v0.19.15
   Compiling casbin v2.0.7 (/home/runner/work/casbin-rs/casbin-rs)
error[E0554]: `#![feature]` may not be used on the stable release channel
 --> benches/benchmark.rs:1:1
  |
1 | #![feature(test)]
  | ^^^^^^^^^^^^^^^^^

error: aborting due to previous error

For more information about this error, try `rustc --explain E0554`.
error: could not compile `casbin`

It is required to delete the existing benchmark dependency before migrating to criterion.rs - https://github.com/casbin/casbin-rs/pull/242.

codecov[bot] commented 3 years ago

Codecov Report

Merging #248 (6f3992f) into master (1be8610) will decrease coverage by 0.26%. The diff coverage is 100.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #248      +/-   ##
==========================================
- Coverage   80.25%   79.99%   -0.27%     
==========================================
  Files          22       22              
  Lines        3429     3429              
==========================================
- Hits         2752     2743       -9     
- Misses        677      686       +9     
Impacted Files Coverage Δ
src/enforcer.rs 85.54% <100.00%> (-0.40%) :arrow_down:
src/effector.rs 74.54% <0.00%> (-3.64%) :arrow_down:
src/model/default_model.rs 92.58% <0.00%> (-0.90%) :arrow_down:
src/config.rs 86.33% <0.00%> (-0.63%) :arrow_down:

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 1be8610...6f3992f. Read the comment docs.

hsluoyz commented 3 years ago

@hackerchai

hackerchai commented 3 years ago

@smrpn please start your pr from the latest commit of casbin-rs