metermaid

package module
v0.0.0-...-b17bc36 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2022 License: BSD-3-Clause Imports: 4 Imported by: 0

README

MeterMaid is a way to detail throughput for various benchmarks Usually used in concert with https://github.com/jamiealquiza/tachymeter

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Size          int
	HBins         int
	SampleSeconds int
}

type Metermaid

type Metermaid struct {
	sync.Mutex
	Size          uint64
	Times         tsSlice
	Count         uint64
	HBins         int
	SampleSeconds int
}

func New

func New(c *Config) *Metermaid

Startup

func (*Metermaid) Add

func (m *Metermaid) Add()

Add at Now

func (*Metermaid) AddTS

func (m *Metermaid) AddTS(t time.Time)

Add at Time

func (*Metermaid) Calc

func (m *Metermaid) Calc() *Metrics

type Metrics

type Metrics struct {
	Samples    int
	StartTime  time.Time
	EndTime    time.Time
	DataPoints map[int64]int
	MinRate    float64
	MaxRate    float64
	MedianRate float64
	P95Rate    float64
	P99Rate    float64
	P999Rate   float64
}

Jump to

Keyboard shortcuts

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