Crate aptos_metrics_core
source · [−]Modules
OpCounters
is a collection of convenience methods to add arbitrary counters to modules.
For now, it supports Int-Counters, Int-Gauges, and Histogram.
Macros
Helper function to record metrics for external calls. Include call counts, time, and whether it’s inside or not (1 or 0). It assumes a OpMetrics defined as OP_COUNTERS in crate::counters;
Create a Histogram
and registers to default registry.
Create a HistogramVec
and registers to default registry.
Create an IntCounter
and registers to default registry.
Create an IntCounterVec
and registers to default registry.
Create an IntGauge
and registers to default registry.
Create an IntGaugeVec
and registers to default registry.
Structs
Timer to measure and record the duration of an event.
An implementation of an Encoder
that converts a MetricFamily
proto message
into text format.
Traits
An interface for encoding metric families into an underlying wire protocol.
Functions
Create count
buckets, where the lowest bucket has an
upper bound of start
and each following bucket’s upper bound is factor
times the previous bucket’s upper bound. The final +Inf bucket is not counted
and not included in the returned slice. The returned slice is meant to be
used for the Buckets field of HistogramOpts
.
Return all MetricFamily
of DEFAULT_REGISTRY
.
Type Definitions
The integer version of Counter
. Provides better performance if metric values
are all positive integers (natural numbers).
The integer version of CounterVec
. Provides better performance if metric
are all positive integers (natural numbers).
The integer version of Gauge
. Provides better performance if metric values are
all integers.
The integer version of GaugeVec
. Provides better performance if metric values
are all integers.