-
Notifications
You must be signed in to change notification settings - Fork 7
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 eviction alg hit ratio bench #299
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Rest LGTM. Thanks for your efforts. Please resolve the comments. Any question or discussion is welcomed. 🥰
BTW, I've approved the Github Action. You can run CI and check the results now. |
The enum cache is more easy to use since it only has two generic parameters. The generic cache is more like an internal interface. Signed-off-by: xiaguan <751080330@qq.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM! Thanks for your effort.
Signed-off-by: xiaguan <751080330@qq.com>
All test fixed. |
Hi, you can run |
And if hakari check failed on CI, just remove the local Cargo.lock file and run make fast locally again. |
Signed-off-by: xiaguan <751080330@qq.com>
Thanks , it works. |
Agreed. Currently PR message covers some instructions except the hakari part. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## main #299 +/- ##
==========================================
- Coverage 77.11% 77.10% -0.02%
==========================================
Files 61 61
Lines 7478 7478
==========================================
- Hits 5767 5766 -1
- Misses 1711 1712 +1 ☔ View full report in Codecov by Sentry. |
* feat: add eviction alg hit ratio bench * refactor: use enum cache instead of generic cache The enum cache is more easy to use since it only has two generic parameters. The generic cache is more like an internal interface. Signed-off-by: xiaguan <751080330@qq.com> * chore : sort foyer_memory's dependencies Signed-off-by: xiaguan <751080330@qq.com> * chore: use hakari to gen better dependencies Signed-off-by: xiaguan <751080330@qq.com> --------- Signed-off-by: xiaguan <751080330@qq.com>
What's changed and what's your intention?
insipred by https://github.com/cloudflare/pingora/blob/main/tinyufo/benches/bench_hit_ratio.rs
In order to implement new eviction algorithms later, such as s3fifo, we need an intuitive test to demonstrate how these algorithms work.
I also plan to test their performance under real trace datasets later (Tencent Photo Cache, Twitter Cache Trace). Should I include CSV files of around 200KB in the repository?
Checklist
make all
(ormake fast
instead if the old tests are not modified) in my local environment.Related issues or PRs (optional)