al8n / stretto

Stretto is a Rust implementation for Dgraph's ristretto (https://github.com/dgraph-io/ristretto). A high performance memory-bound Rust cache.
Apache License 2.0
413 stars 28 forks source link

fix: random choose sample #42

Open Millione opened 1 year ago

Millione commented 1 year ago

37

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 90.90% and project coverage change: +0.39 :tada:

Comparison is base (d1fc4e8) 83.43% compared to head (c93fe98) 83.83%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## main #42 +/- ## ========================================== + Coverage 83.43% 83.83% +0.39% ========================================== Files 17 17 Lines 1920 1930 +10 ========================================== + Hits 1602 1618 +16 + Misses 318 312 -6 ``` | [Impacted Files](https://codecov.io/gh/al8n/stretto/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Al+Liu) | Coverage Δ | | |---|---|---| | [src/policy.rs](https://codecov.io/gh/al8n/stretto/pull/42?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Al+Liu#diff-c3JjL3BvbGljeS5ycw==) | `94.47% <90.90%> (-0.27%)` | :arrow_down: | ... and [7 files with indirect coverage changes](https://codecov.io/gh/al8n/stretto/pull/42/indirect-changes?src=pr&el=tree-more&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Al+Liu) Help us with your feedback. Take ten seconds to tell us [how you rate us](https://about.codecov.io/nps?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Al+Liu). Have a feature suggestion? [Share it here.](https://app.codecov.io/gh/feedback/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=Al+Liu)

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Do you have feedback about the report comment? Let us know in this issue.

al8n commented 1 year ago

Thanks! But let's wait for @alfa07 and @phantomhker's feedback about if the ringbuffer stuff solves the hit ratio problem mentioned in #37 because using rand will bring extra overhead for performance.