test

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2020 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AggregatorSelector

func AggregatorSelector() export.AggregatorSelector

AggregatorSelector returns a policy that is consistent with the test descriptors above. I.e., it returns sum.New() for counter instruments and lastvalue.New() for lastValue instruments.

Types

type Output

type Output struct {
	Map map[string]float64
	// contains filtered or unexported fields
}

Output collects distinct metric/label set outputs.

func NewOutput

func NewOutput(labelEncoder label.Encoder) Output

func (Output) AddAccumulation

func (o Output) AddAccumulation(acc export.Accumulation) error

AddAccumulation adds a string representation of the exported metric data to a map for use in testing. The value taken from the accumulation is either the Sum() or the LastValue() of its Aggregator().Aggregation(), whichever is defined.

func (Output) AddRecord

func (o Output) AddRecord(rec export.Record) error

AddRecord adds a string representation of the exported metric data to a map for use in testing. The value taken from the record is either the Sum() or the LastValue() of its Aggregation(), whichever is defined. Record timestamps are ignored.

Jump to

Keyboard shortcuts

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