casbin / Casbin.NET

An authorization library that supports access control models like ACL, RBAC, ABAC in .NET (C#)
https://casbin.org
Apache License 2.0
1.16k stars 111 forks source link

feat: Benchmark with more realistic data #241

Closed Leonardo-Ferreira closed 1 year ago

Leonardo-Ferreira commented 2 years ago

The original benchmark for RBAC With Cache was a bit unrealistic because the same user and the same data was always requested, which is a highly cache-able scenario. By introducing a little variance on the the user and data actually enforced, we can see a MAJOR skew on large datasets but NOT on the smaller ones (this proves that the "randomization" is not the actual at-fault for the performance drop)

casbin-bot commented 2 years ago

@sagilio @xcaptain @huazhikui please review

CLAassistant commented 2 years ago

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
3 out of 5 committers have signed the CLA.

:white_check_mark: hsluoyz
:white_check_mark: sagilio
:white_check_mark: Leonardo-Ferreira
:x: apiscevs
:x: dviry
You have signed the CLA already but the status is still pending? Let us recheck it.

sagilio commented 2 years ago

It is a great point. But the old benchmark is synced from the go casbin repo, it is better to use a new file like EnforcerWithCacheRandomBenchmark.cs

hsluoyz commented 2 years ago

@Leonardo-Ferreira plz fix:

image

Leonardo-Ferreira commented 2 years ago

@hsluoyz this error happens because I cannot read the repos secret. If you look at the activity, it has successfully analyzed the code, but failed at the step of uploading the report due to a invalid key (it was not replaced). This issue is being fixed on a separate PR

hsluoyz commented 2 years ago

@sagilio