import "go.opentelemetry.io/otel/sdk/export/metric/metrictest"
func Unslice2(sl interface{}) (one, two export.Aggregator)
Takes a slice of []some.Aggregator and returns a slice of []export.Aggregator
CheckpointSet is useful for testing Exporters. TODO(#872): Uses of this can be replaced by processortest.Output.
func NewCheckpointSet(resource *resource.Resource) *CheckpointSet
NewCheckpointSet returns a test CheckpointSet that new records could be added. Records are grouped by their encoded labels.
func (p *CheckpointSet) Add(desc *metric.Descriptor, newAgg export.Aggregator, labels ...label.KeyValue) (agg export.Aggregator, added bool)
Add a new record to a CheckpointSet.
If there is an existing record with the same descriptor and labels, the stored aggregator will be returned and should be merged.
func (p *CheckpointSet) ForEach(_ export.ExportKindSelector, f func(export.Record) error) error
ForEach does not use ExportKindSelected: use a real Processor to test ExportKind functionality.
func (p *CheckpointSet) Reset()
Reset clears the Aggregator state.
type NoopAggregator struct{}
NoopAggregator is useful for testing Exporters.
func (NoopAggregator) Aggregation() aggregation.Aggregation
Aggregation returns an interface for reading the state of this aggregator.
func (NoopAggregator) Kind() aggregation.Kind
Kind implements aggregation.Aggregation.
func (NoopAggregator) Merge(export.Aggregator, *metric.Descriptor) error
Merge implements export.Aggregator.
func (NoopAggregator) SynchronizedMove(export.Aggregator, *metric.Descriptor) error
SynchronizedMove implements export.Aggregator.
func (NoopAggregator) Update(context.Context, number.Number, *metric.Descriptor) error
Update implements export.Aggregator.
Package metrictest imports 11 packages (graph). Updated 2020-11-13. Refresh now. Tools for package owners.