hist

package
v0.0.0-...-1085dcf Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Histogram

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

Histogram defines a histogram.

func NewHistogram

func NewHistogram(max int, scale int) *Histogram

NewHistogram creates a new Histogram.

func (*Histogram) Add

func (h *Histogram) Add(v int)

Add adds a new value to the histogram.

func (*Histogram) AddError

func (h *Histogram) AddError(v int)

AddError adds a new error value to the histogram.

func (*Histogram) Average

func (h *Histogram) Average() float64

Average returns the histogram's average value.

func (*Histogram) End

func (h *Histogram) End(t int)

End ends the hisogram with the given value.

func (*Histogram) ErrorPercent

func (h *Histogram) ErrorPercent() float64

ErrorPercent returns the hisogram's error percentage.

func (*Histogram) Percentiles

func (h *Histogram) Percentiles(percentiles ...float64) []int

Percentiles produces the values for the given percentiles.

func (*Histogram) Start

func (h *Histogram) Start(t int)

Start starts the histogram with the given value.

func (*Histogram) String

func (h *Histogram) String() string

Jump to

Keyboard shortcuts

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