hist

package
Version: v0.0.0-...-7410f78 Latest Latest
Warning

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

Go to latest
Published: May 2, 2022 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

Source Files

Jump to

Keyboard shortcuts

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