client_rust
client_rust copied to clipboard
HistogramTimer API
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:
- 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)
- It would simplify the process of porting code from docs.rs/prometheus over to this crate.
Happy to implement this myself.
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.
Referencing https://github.com/nox/prometools/blob/main/src/histogram.rs by @nox here.
Again, I am in favor of supporting this natively.