-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
[Enhancement] Support display datacache's hit rate in app level #48450
Conversation
be/src/block_cache/block_cache.h
Outdated
@@ -22,6 +24,26 @@ | |||
|
|||
namespace starrocks { | |||
|
|||
class BlockCacheHitRateCounter { |
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.
How about to move this class to another independent file? Because it actually save the upper layer statistics and has nothing to do with the underly block cache module. Also, it is unnecessary to include the bvar header to other modules which use block cache.
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.
changed
Signed-off-by: Smith Cruise <[email protected]>
Signed-off-by: Smith Cruise <[email protected]>
Signed-off-by: Smith Cruise <[email protected]>
Signed-off-by: Smith Cruise <[email protected]>
Signed-off-by: Smith Cruise <[email protected]>
Signed-off-by: Smith Cruise <[email protected]>
99ee464
to
94e38fa
Compare
[FE Incremental Coverage Report]✅ pass : 0 / 0 (0%) |
[BE Incremental Coverage Report]✅ pass : 36 / 36 (100.00%) file detail
|
@Mergifyio backport branch-3.3 |
✅ Backports have been created
|
Signed-off-by: Smith Cruise <[email protected]> (cherry picked from commit 3419fd1)
…port #48450) (#48617) Co-authored-by: Smith Cruise <[email protected]>
…Rocks#48450) Signed-off-by: Smith Cruise <[email protected]>
Why I'm doing:
hit rate in
curl -XGET http://127.0.0.1:4449/api/datacache/stat
can't reflect the real hit rate in the user-end.This makes it difficult for users to determine whether DataCache is truly effective.
What I'm doing:
Add stat metrics at the application level.
Using
curl -XGET http://127.0.0.1:4449/api/datacache/app_stat
to check it.Algorithm:
hit_rate = read_cache_bytes / (read_cache_bytes + read_network_bytes)
.What type of PR is this:
Does this PR entail a change in behavior?
If yes, please specify the type of change:
Checklist:
Bugfix cherry-pick branch check: