summary

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: Apache-2.0 Imports: 2 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckEqual

func CheckEqual(a, e Summary) error

CheckEqual returns an error if the summaries are not equal

Types

type Summary

type Summary struct {
	// TODO: store min/max in the entries array of the summary.
	Min, Max, Sum, Avg float64

	// TODO: cnt is a duplicate of sketch.n.
	Cnt int64
}

A Summary stores basic incremental stats.

func (*Summary) Insert

func (s *Summary) Insert(v float64)

Insert adds a single value to the summary.

func (*Summary) InsertN

func (s *Summary) InsertN(v float64, n float64)

InsertN is equivalent to calling Insert(v) n times (but faster).

func (*Summary) Merge

func (s *Summary) Merge(o Summary)

Merge another summary into this one.

func (*Summary) Reset

func (s *Summary) Reset()

Reset the summary

func (*Summary) String

func (s *Summary) String() string

Jump to

Keyboard shortcuts

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