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

HistogramTimer API #101

Open
adamchalmers opened this issue Sep 30, 2022 · 2 comments
Open

HistogramTimer API #101

adamchalmers opened this issue Sep 30, 2022 · 2 comments

Comments

@adamchalmers
Copy link
Contributor

Hi! My team at work is converting some of our projects over from docs.rs/prometheus to this crate. One nice-to-have feature we miss from the old crate is the HistogramTimer type. I suggest adding it into this crate for two reasons:

  1. It's convenient for working with histograms and less error-prone than tracking time manually (using HistogramTimer means you don't have to check every possible early return/drop point yourself)
  2. It would simplify the process of porting code from docs.rs/prometheus over to this crate.

Happy to implement this myself.

@mxinden
Copy link
Member

mxinden commented Oct 4, 2022

I am in favor of this. Given that Histogram is Clone, Send and Sync, I don't think this change will be intrusive.

Happy to implement this myself.

Great. Thank you. Let me know in case you need any help.

@mxinden
Copy link
Member

mxinden commented Jan 2, 2023

Referencing https://github.com/nox/prometools/blob/main/src/histogram.rs by @nox here.

Again, I am in favor of supporting this natively.

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

No branches or pull requests

2 participants