metricstestutil

package
v0.48.1 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Cumulative

func Cumulative(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Cumulative creates a cumulative metric.

func CumulativeDist

func CumulativeDist(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

CumulativeDist creates a cumulative distribution metric.

func CumulativeInt

func CumulativeInt(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

CumulativeInt creates a cumulative metric of type int64.

func DistPt

func DistPt(ts time.Time, bounds []float64, counts []int64) *metricspb.Point

DistPt creates a distribution point. It takes the time stamp, the bucket boundaries for the distribution, and the and counts for the individual buckets as input.

func Double

func Double(ts time.Time, value float64) *metricspb.Point

Double creates a double point.

func Gauge

func Gauge(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Gauge creates a gauge metric.

func GaugeDist

func GaugeDist(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

GaugeDist creates a gauge distribution metric.

func GaugeInt

func GaugeInt(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

GaugeInt creates a gauge metric of type int64.

func SummPt

func SummPt(ts time.Time, count int64, sum float64, percent, vals []float64) *metricspb.Point

SummPt creates a summary point.

func Summary

func Summary(name string, keys []string, timeseries ...*metricspb.TimeSeries) *metricspb.Metric

Summary creates a summary metric.

func Timeseries

func Timeseries(sts time.Time, vals []string, point *metricspb.Point) *metricspb.TimeSeries

Timeseries creates a timeseries. It takes the start time stamp, a sequence of label values (associated with the label keys in the overall metric), and the value of the timeseries.

Types

This section is empty.

Jump to

Keyboard shortcuts

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