Back to

Package metricstestutils

Latest Go to latest
Published: Jun 16, 2020 | License: Apache-2.0 | Module:


Package Files

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.

func Timestamp

func Timestamp(ts time.Time) *timestamppb.Timestamp

Timestamp creates a timestamp.

Documentation was rendered with GOOS=linux and GOARCH=amd64.

Jump to identifier

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to identifier