ddsketch

package
v0.0.0-...-a71ec85 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2019 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Copyright 2019, OpenTelemetry Authors

Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDefaultConfig

func NewDefaultConfig() *sdk.Config

NewDefaultConfig returns a new, default DDSketch config.

Types

type Aggregator

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

Aggregator aggregates measure events.

func New

func New(cfg *sdk.Config, desc *export.Descriptor) *Aggregator

New returns a new DDSketch aggregator.

func (*Aggregator) Collect

func (c *Aggregator) Collect(ctx context.Context, rec export.MetricRecord, exp export.MetricBatcher)

Collect checkpoints the current value (atomically) and exports it.

func (*Aggregator) Count

func (c *Aggregator) Count() int64

Count returns the count of the checkpoint.

func (*Aggregator) Max

func (c *Aggregator) Max() float64

Max returns the max of the checkpoint.

func (*Aggregator) Merge

func (*Aggregator) Min

func (c *Aggregator) Min() float64

Min returns the min of the checkpoint.

func (*Aggregator) Quantile

func (c *Aggregator) Quantile(q float64) float64

Quantile returns the estimated quantile of the checkpoint.

func (*Aggregator) Sum

func (c *Aggregator) Sum() float64

Sum returns the sum of the checkpoint.

func (*Aggregator) Update

func (c *Aggregator) Update(_ context.Context, number core.Number, rec export.MetricRecord)

Update modifies the current value (atomically) for later export.

Jump to

Keyboard shortcuts

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