test

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Sep 2, 2021 License: Apache-2.0 Imports: 11 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 core.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 core.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 core.NumberKind) Numbers

func (*Numbers) Append

func (n *Numbers) Append(v core.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() core.Number

func (*Numbers) Median

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

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

func (*Numbers) Min

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

func (*Numbers) Points

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

func (*Numbers) Sort

func (n *Numbers) Sort()

func (*Numbers) Sum

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

func (*Numbers) Swap

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

type Profile

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

Jump to

Keyboard shortcuts

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