pub struct Histogram { /* fields omitted */ }
A Metric
counts individual observations from an event or sample stream in
configurable buckets. Similar to a summary, it also provides a sum of
observations and an observation count.
On the Prometheus server, quantiles can be calculated from a Histogram
using
the histogram_quantile
function in the query language.
Note that Histograms, in contrast to Summaries, can be aggregated with the
Prometheus query language (see the documentation for detailed
procedures). However, Histograms require the user to pre-define suitable
buckets, and they are in general less accurate. The Observe method of a
Histogram
has a very low performance overhead in comparison with the Observe
method of a Summary.
with_opts
creates a Histogram
with the opts
options.
Return descriptors for metrics.
Return the protocol Metric.
Performs copy-assignment from source
. Read more
Creates owned data from borrowed data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (toowned_clone_into
)
recently added
Uses borrowed data to replace owned data, usually by cloning. Read more
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Immutably borrows from an owned value. Read more
🔬 This is a nightly-only experimental API. (get_type_id
)
this method will likely be replaced by an associated static
🔬 This is a nightly-only experimental API. (try_from
)
The type returned in the event of a conversion error.
🔬 This is a nightly-only experimental API. (try_from
)
Mutably borrows from an owned value. Read more