criticalmass

package
v0.0.0-...-614a490 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2018 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var DefualtLimits = Limits{
	MaxShort: time.Duration(time.Second * 5),
	MaxLong:  time.Duration(time.Second * 15),
}
View Source
var LongLimits = Limits{
	MaxShort: time.Duration(time.Minute),
	MaxLong:  time.Duration(time.Minute * 10),
}

Functions

func NewHistory

func NewHistory(l time.Duration) *history

Types

type Entry

type Entry struct {
	When time.Time
	Dur  time.Duration
}

type Gauge

type Gauge struct {
	Total avarageData
	Short history
	Long  history
}

func (Gauge) Trend

func (g Gauge) Trend() Trend

type Limits

type Limits struct {
	MaxShort time.Duration
	MaxLong  time.Duration
}

type Trend

type Trend int
const (
	TrendFlat   Trend = iota
	TrendSlower       // Bigger numbers
	TrendFaster       // Smaller numbers
)

Jump to

Keyboard shortcuts

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