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

More metrics for LoadedPrograms cache #31735

Merged
merged 1 commit into from
May 22, 2023
Merged

Conversation

pgarg66
Copy link
Contributor

@pgarg66 pgarg66 commented May 19, 2023

Problem

Missing metrics datapoints for prune and a few other use-cases.

Summary of Changes

Added datapoint for Prune, and eviction.

Fixes #

@codecov
Copy link

codecov bot commented May 19, 2023

Codecov Report

Merging #31735 (b542a5b) into master (4eea22c) will increase coverage by 0.0%.
The diff coverage is 88.0%.

@@           Coverage Diff           @@
##           master   #31735   +/-   ##
=======================================
  Coverage    81.8%    81.8%           
=======================================
  Files         736      736           
  Lines      205959   205982   +23     
=======================================
+ Hits       168658   168682   +24     
+ Misses      37301    37300    -1     

@pgarg66 pgarg66 requested a review from Lichtso May 19, 2023 23:04
self.entries.retain(|_, programs| !programs.is_empty());
if self.entries.len() < num_programs_before_removal {
self.stats.empty_entries.fetch_add(
num_programs_before_removal.saturating_sub(self.entries.len()) as u64,
Copy link
Contributor

Choose a reason for hiding this comment

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

This is just about the keys of the first index and has nothing to do with entries of the second index, like all other metrics do?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, this is just counting how many programs were completely removed from the cache.

@pgarg66 pgarg66 requested a review from Lichtso May 22, 2023 13:21
@pgarg66 pgarg66 merged commit 29904bb into solana-labs:master May 22, 2023
@pgarg66 pgarg66 deleted the more-metrics branch May 22, 2023 14:53
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.

2 participants