-
Notifications
You must be signed in to change notification settings - Fork 188
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
Feat/254 int histogram #388
base: master
Are you sure you want to change the base?
Conversation
@@ -217,9 +217,11 @@ pub use self::encoder::TextEncoder; | |||
pub use self::encoder::{PROTOBUF_FORMAT, TEXT_FORMAT}; | |||
pub use self::errors::{Error, Result}; | |||
pub use self::gauge::{Gauge, GaugeVec, IntGauge, IntGaugeVec}; | |||
#[deprecated(since = "0.12.0", note = "Please use DEFAULT_FLOAT_BUCKETS")] | |||
pub use self::histogram::DEFAULT_BUCKETS; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Considering that Histogram is called Histogram instead of FloatHistogram, I suggest to keep DEFAULT_BUCKETS
and not being DEFAULT_FLOAT_BUCKETS
. What do you think?
@@ -41,9 +48,34 @@ fn check_bucket_label(label: &str) -> Result<()> { | |||
Ok(()) | |||
} | |||
|
|||
fn check_and_adjust_buckets(mut buckets: Vec<f64>) -> Result<Vec<f64>> { | |||
fn check_and_adjust_int_buckets(mut buckets: Vec<u64>) -> Result<Vec<u64>> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe we can use generics to avoid writing code twice.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
From what i can tell this would require a bit of a re-architecture. I will take a closer look this may be a breaking change and see what i can do.
|
||
} | ||
|
||
impl IntHistogramCore { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We'd better avoid duplicating these codes. You can try with generics!
No description provided.