From f888b852a2eb6df92e00c3b42d7e5ec49fbf0403 Mon Sep 17 00:00:00 2001 From: Russell Cohen Date: Wed, 16 Oct 2024 16:33:30 -0400 Subject: [PATCH] Clarify comment --- tokio/src/runtime/builder.rs | 1 - tokio/src/runtime/metrics/histogram/h2_histogram.rs | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/tokio/src/runtime/builder.rs b/tokio/src/runtime/builder.rs index 802bcb51de9..883713e8230 100644 --- a/tokio/src/runtime/builder.rs +++ b/tokio/src/runtime/builder.rs @@ -1222,7 +1222,6 @@ impl Builder { /// .unwrap(); /// ``` /// - /// /// [`LogHistogram`]: crate::runtime::LogHistogram /// [default configuration]: crate::runtime::LogHistogramBuilder pub fn metrics_poll_count_histogram_configuration(&mut self, configuration: HistogramConfiguration) -> &mut Self { diff --git a/tokio/src/runtime/metrics/histogram/h2_histogram.rs b/tokio/src/runtime/metrics/histogram/h2_histogram.rs index 99a5e429925..09e554440f4 100644 --- a/tokio/src/runtime/metrics/histogram/h2_histogram.rs +++ b/tokio/src/runtime/metrics/histogram/h2_histogram.rs @@ -121,7 +121,8 @@ impl LogHistogram { /// the range from 0 to [`LogHistogramBuilder::min_value`] and the final bucket covers /// [`LogHistogramBuilder::max_value`] to infinity. The precision is bounded to the specified /// [`LogHistogramBuilder::max_error`]. Specifically, the precision is the next smallest value -/// of `2^-p` such that it is smaller than the requested precision. +/// of `2^-p` such that it is smaller than the requested max error. You can also select `p` directly +/// with [`LogHistogramBuilder::precision_exact`]. /// /// Depending on the selected parameters, the number of buckets required is variable. To ensure /// that the histogram size is acceptable, callers may call [`LogHistogramBuilder::max_buckets`].