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

*: add lru cache to speed up scanning logs #302

Draft
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

BusyJay
Copy link
Member

@BusyJay BusyJay commented Mar 30, 2023

# Master:
test engine::tests::bench_engine_fetch_entries              ... bench:      23,738 ns/iter (+/- 1,027)

# This PR:
test engine::tests::bench_engine_fetch_entries              ... bench:      18,127 ns/iter (+/- 517)

It's not a fair comparison because thread local cache can only cache a block, but global lru cache can cache 256MiB. But it's just a way to show potential improvement on scanning logs.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Global cache is wrong if there are multiple raft engine or raft
engine is reopen multiple times.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@codecov
Copy link

codecov bot commented Mar 30, 2023

Codecov Report

Attention: Patch coverage is 94.21769% with 17 lines in your changes missing coverage. Please review.

Project coverage is 97.82%. Comparing base (39f4db4) to head (02f4c85).
Report is 36 commits behind head on master.

Files with missing lines Patch % Lines
src/cache.rs 93.51% 14 Missing ⚠️
src/engine.rs 95.08% 3 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #302      +/-   ##
==========================================
- Coverage   97.89%   97.82%   -0.07%     
==========================================
  Files          31       32       +1     
  Lines       12228    12435     +207     
==========================================
+ Hits        11970    12164     +194     
- Misses        258      271      +13     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Jay Lee <BusyJayLee@gmail.com>
@tonyxuqqi tonyxuqqi requested review from tabokie and hicqu April 25, 2023 06:24
Copy link

ti-chi-bot bot commented Nov 5, 2024

@BusyJay: The following test failed, say /retest to rerun all failed tests or /retest-required to rerun all mandatory failed tests:

Test name Commit Details Required Rerun command
rust-nightly 02f4c85 link true /test rust-nightly

Full PR test history. Your PR dashboard.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository. I understand the commands that are listed here.

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.

1 participant