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

Update readdirplus metric to use histogram instead of counter #1254

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mansi153
Copy link

@mansi153 mansi153 commented Feb 5, 2025

Update readdirplus API's fuse.readdirplus.entries metric to use histogram instead of counter, as it would make more sense to record statistics on how many entries were returned in a readdirplus request when there was more than one in a given interval, than recording the total readdirplus entries per interval.

Addresses #1236.

Does this change impact existing behavior?

Yes, the fuse.readdirplus.entries metric type has been changed.

Does this change need a changelog entry? Does it require a version change?

No, it is only updating a metric. Since metric names and availability are considered unstable, this does not need a changelog entry or version change.


By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and I agree to the terms of the Developer Certificate of Origin (DCO).

@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
@mansi153 mansi153 temporarily deployed to PR integration tests February 5, 2025 13:09 — with GitHub Actions Inactive
Copy link
Contributor

@dannycjones dannycjones left a comment

Choose a reason for hiding this comment

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

This looks good. Some operating systems use readdir instead of readdirplus, we should cover that one too. Otherwise, looks good to ship!

@@ -225,7 +225,7 @@ where
match block_on(self.fs.readdirplus(parent, fh, offset, replier).in_current_span()) {
Ok(_) => {
reply.ok();
metrics::counter!("fuse.readdirplus.entries").increment(count as u64);
metrics::histogram!("fuse.readdirplus.entries").record(count as f64);
Copy link
Contributor

@dannycjones dannycjones Feb 5, 2025

Choose a reason for hiding this comment

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

We should make the same change for the readdir operation, as well as readdirplus. I missed that in the original issue!

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