estimator

package
v0.2.19-0...-0e46f23 Latest Latest
Warning

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

Go to latest
Published: Feb 8, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const EstimatorRange int = 3

Variables

This section is empty.

Functions

func MovingExpAvg

func MovingExpAvg(value, oldValue, fdtime, ftime float64) float64

Types

type Estimator

type Estimator struct {
	sync.Mutex

	RS map[int]*RequestStat
}

func NewEstimator

func NewEstimator() *Estimator

func (*Estimator) MarshalJSON

func (e *Estimator) MarshalJSON() ([]byte, error)

func (*Estimator) Push

func (e *Estimator) Push(size uint64, status int)

func (*Estimator) PushNolock

func (e *Estimator) PushNolock(requests, size uint64, status int)

type RequestStat

type RequestStat struct {
	SStat []Second `json:"-"`
	BPS   float64
	RPS   float64
}

func NewRequestStat

func NewRequestStat() *RequestStat

func (*RequestStat) Copy

func (r *RequestStat) Copy(start int)

type Second

type Second struct {
	Second int
	BPS    uint64
	RPS    uint64
}

Jump to

Keyboard shortcuts

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