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

Record and export the keyspace hit/miss count to INFO command #1971

Merged
merged 2 commits into from
Dec 27, 2023

Conversation

git-hulk
Copy link
Member

Currently, Redis supports inspecting the keyspace hit/miss count via
INFO command to see if the hit ratio is expected. So we also export
the same metric to align with Redis metrics.

This closes #1937

Currently, Redis supports to inspect the keyspace hit/miss count via
INFO command to see if the hit ratio is expected. So we also export
the same metric to align with Redis metrics.
@git-hulk git-hulk force-pushed the feature/add-keyspace-stat branch from 27f7000 to dad4409 Compare December 26, 2023 14:09
Copy link

sonarcloud bot commented Dec 26, 2023

Quality Gate Passed Quality Gate passed

Kudos, no new issues were introduced!

0 New issues
0 Security Hotspots
No data about Coverage
2.0% Duplication on New Code

See analysis details on SonarCloud

@git-hulk git-hulk merged commit 5b54f9c into apache:unstable Dec 27, 2023
29 checks passed
db_stats_.compaction_count += v;
break;
case StatType::KeyspaceHits:
db_stats_.keyspace_hits += v;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would fetch_add(relaxed) better, which might not need to hold the execution pipeline?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@mapleFU Yes, it don't require strict sequence increase.

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.

Add keyspace_hits and keyspace_misses statistics that be consistent with Redis
3 participants