Documentation ¶
Index ¶
- Constants
- func CheckedMerge(t *testing.T, aggInto, aggFrom aggregator.Aggregator, ...)
- func CheckedUpdate(t *testing.T, agg aggregator.Aggregator, n number.Number, ...)
- func NewAggregatorTest(mkind sdkapi.InstrumentKind, nkind number.Kind) *sdkapi.Descriptor
- func RunProfiles(t *testing.T, f func(*testing.T, Profile))
- func SynchronizedMoveResetTest(t *testing.T, mkind sdkapi.InstrumentKind, ...)
- func TestMain(m *testing.M)
- type NoopAggregation
- type NoopAggregator
- func (NoopAggregator) Aggregation() aggregation.Aggregation
- func (NoopAggregator) Merge(aggregator.Aggregator, *sdkapi.Descriptor) error
- func (NoopAggregator) SynchronizedMove(aggregator.Aggregator, *sdkapi.Descriptor) error
- func (NoopAggregator) Update(context.Context, number.Number, *sdkapi.Descriptor) error
- type Numbers
- func (n *Numbers) Append(v number.Number)
- func (n *Numbers) Count() uint64
- func (n *Numbers) Len() int
- func (n *Numbers) Less(i, j int) bool
- func (n *Numbers) Max() number.Number
- func (n *Numbers) Min() number.Number
- func (n *Numbers) Points() []number.Number
- func (n *Numbers) Sort()
- func (n *Numbers) Sum() number.Number
- func (n *Numbers) Swap(i, j int)
- type Profile
Constants ¶
const Magnitude = 1000
Magnitude is the upper-bound of random numbers used in profile tests.
Variables ¶
This section is empty.
Functions ¶
func CheckedMerge ¶
func CheckedMerge(t *testing.T, aggInto, aggFrom aggregator.Aggregator, descriptor *sdkapi.Descriptor)
CheckedMerge verifies aggFrom merges into aggInto with the scope of descriptor.
func CheckedUpdate ¶
func CheckedUpdate(t *testing.T, agg aggregator.Aggregator, n number.Number, descriptor *sdkapi.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) *sdkapi.Descriptor
NewAggregatorTest returns a descriptor for mkind and nkind.
func RunProfiles ¶
RunProfiles runs all test profile against the factory function f.
func SynchronizedMoveResetTest ¶
func SynchronizedMoveResetTest(t *testing.T, mkind sdkapi.InstrumentKind, nf func(*sdkapi.Descriptor) aggregator.Aggregator)
SynchronizedMoveResetTest tests SynchronizedMove behavior for an aggregator during resets.
Types ¶
type NoopAggregation ¶
type NoopAggregation struct{}
NoopAggregation is an aggregation that performs no operations.
func (NoopAggregation) Kind ¶
func (NoopAggregation) Kind() aggregation.Kind
Kind returns a Noop aggregation Kind.
type NoopAggregator ¶
type NoopAggregator struct{}
NoopAggregator is an aggregator that performs no operations.
func (NoopAggregator) Aggregation ¶
func (NoopAggregator) Aggregation() aggregation.Aggregation
Aggregation returns a NoopAggregation.
func (NoopAggregator) Merge ¶
func (NoopAggregator) Merge(aggregator.Aggregator, *sdkapi.Descriptor) error
Merge performs no operation.
func (NoopAggregator) SynchronizedMove ¶
func (NoopAggregator) SynchronizedMove(aggregator.Aggregator, *sdkapi.Descriptor) error
SynchronizedMove performs no operation.
func (NoopAggregator) Update ¶
func (NoopAggregator) Update(context.Context, number.Number, *sdkapi.Descriptor) error
Update performs no operation.
type Numbers ¶
type Numbers struct {
// contains filtered or unexported fields
}
Numbers are a collection of measured data point values.
func NewNumbers ¶
NewNumbers returns a new Numbers for the passed kind.