aggregatortest

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const Magnitude = 1000

Variables

This section is empty.

Functions

func CheckedMerge

func CheckedMerge(t *testing.T, aggInto, aggFrom export.Aggregator, descriptor *metric.Descriptor)

func CheckedUpdate

func CheckedUpdate(t *testing.T, agg export.Aggregator, number metric.Number, descriptor *metric.Descriptor)

Performs the same range test the SDK does on behalf of the aggregator.

func NewAggregatorTest

func NewAggregatorTest(mkind metric.Kind, nkind metric.NumberKind) *metric.Descriptor

func RunProfiles

func RunProfiles(t *testing.T, f func(*testing.T, Profile))

func TestMain

func TestMain(m *testing.M)

Ensure local struct alignment prior to running tests.

Types

type Numbers

type Numbers struct {
	// contains filtered or unexported fields
}

func NewNumbers

func NewNumbers(kind metric.NumberKind) Numbers

func (*Numbers) Append

func (n *Numbers) Append(v metric.Number)

func (*Numbers) Count

func (n *Numbers) Count() int64

func (*Numbers) Len

func (n *Numbers) Len() int

func (*Numbers) Less

func (n *Numbers) Less(i, j int) bool

func (*Numbers) Max

func (n *Numbers) Max() metric.Number

func (*Numbers) Median

func (n *Numbers) Median() metric.Number

Median() is an alias for Quantile(0.5).

func (*Numbers) Min

func (n *Numbers) Min() metric.Number

func (*Numbers) Points

func (n *Numbers) Points() []metric.Number

func (*Numbers) Sort

func (n *Numbers) Sort()

func (*Numbers) Sum

func (n *Numbers) Sum() metric.Number

func (*Numbers) Swap

func (n *Numbers) Swap(i, j int)

type Profile

type Profile struct {
	NumberKind metric.NumberKind
	Random     func(sign int) metric.Number
}

Jump to

Keyboard shortcuts

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