aggregatortest

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 1, 2021 License: Apache-2.0 Imports: 16 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 number.Number, descriptor *metric.Descriptor)

CheckedUpdate performs the same range test the SDK does on behalf of the aggregator.

func NewAggregatorTest

func NewAggregatorTest(mkind sdkapi.InstrumentKind, nkind number.Kind) *metric.Descriptor

func RunProfiles

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

func SynchronizedMoveResetTest

func SynchronizedMoveResetTest(t *testing.T, mkind sdkapi.InstrumentKind, nf func(*metric.Descriptor) export.Aggregator)

func TestMain

func TestMain(m *testing.M)

TestMain ensures local struct alignment prior to running tests.

Types

type NoopAggregation

type NoopAggregation struct{}

func (NoopAggregation) Kind

type NoopAggregator

type NoopAggregator struct{}

func (NoopAggregator) Aggregation

func (NoopAggregator) Aggregation() aggregation.Aggregation

func (NoopAggregator) Merge

func (NoopAggregator) SynchronizedMove

func (NoopAggregator) SynchronizedMove(export.Aggregator, *metric.Descriptor) error

func (NoopAggregator) Update

type Numbers

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

func NewNumbers

func NewNumbers(kind number.Kind) Numbers

func (*Numbers) Append

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

func (*Numbers) Count

func (n *Numbers) Count() uint64

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() number.Number

func (*Numbers) Min

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

func (*Numbers) Points

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

func (*Numbers) Sort

func (n *Numbers) Sort()

func (*Numbers) Sum

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

func (*Numbers) Swap

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

type Profile

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

Jump to

Keyboard shortcuts

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