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 'get' functions to Registry #457

Merged
merged 1 commit into from
Mar 9, 2024
Merged

Conversation

kathoum
Copy link
Contributor

@kathoum kathoum commented Mar 3, 2024

This adds public functions get_counter, get_gauge, get_histogram, that return a clone of the requested metric stored in the internal Storage.

This allows retrieving a copy of a single metric without creating a full HashMap clone.

Copy link
Member

@tobz tobz left a comment

Choose a reason for hiding this comment

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

Looks good to me. 👍🏻

@tobz tobz added C-util Component: utility classes and helpers. E-simple Effort: simple. T-enhancement Type: enhancement. labels Mar 9, 2024
@tobz tobz merged commit e2c37f4 into metrics-rs:main Mar 9, 2024
12 checks passed
@tobz tobz added the S-awaiting-release Status: awaiting a release to be considered fixed/implemented. label Mar 9, 2024
@tobz
Copy link
Member

tobz commented Mar 16, 2024

Released in [email protected].

Thanks again for your contribution!

@tobz tobz removed the S-awaiting-release Status: awaiting a release to be considered fixed/implemented. label Mar 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-util Component: utility classes and helpers. E-simple Effort: simple. T-enhancement Type: enhancement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants