metric

package
v0.0.0-...-7464013 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 4, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var AppendBatchSizesHistogram metrics.Histogram = metrics.NilHistogram{}

AppendBatchSizesHistogram records the size of Raft entry batches as they are appended to the Raft log.

View Source
var AppendLatencyHistogram metrics.Histogram = metrics.NilHistogram{}

AppendLatencyHistogram records the latency of a log append batch.

View Source
var ApplyBatchSizesHistogram metrics.Histogram = metrics.NilHistogram{}

ApplyBatchSizesHistogram records the size of Raft entry batches as they are applied to the storage engine.

View Source
var ApplyLatencyHistogram metrics.Histogram = metrics.NilHistogram{}

ApplyLatencyHistogram records the latency of a log apply batch.

View Source
var PipelineLatencyHistogram metrics.Histogram = metrics.NilHistogram{}

PipelineLatencyHistogram records the latency of single Raft proposal pipeline iterations.

Functions

func Enable

func Enable(b bool) func()

Enable enables or disables metric collection.

func Enabled

func Enabled() bool

Enabled returns whether metric collection is enabled.

func MeasureLat

func MeasureLat(h metrics.Histogram) func()

MeasureLat measures the delay between the time that the function is first called and the time that the returned closure is called. This value is recorded into the provided histogram.

Suggested use looks like:

defer metric.MeasureLat(metric.AppendBatchSizesHistogram)()

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL