metrics

package
v0.0.0-...-2487acb Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2017 License: Apache-2.0 Imports: 12 Imported by: 6

Documentation

Index

Constants

View Source
const (
	ElapseLess10ms  = "Less10ms"
	ElapseLess20ms  = "Less20ms"
	ElapseLess50ms  = "Less50ms"
	ElapseLess100ms = "Less100ms"
	ElapseLess200ms = "Less200ms"
	ElapseLess500ms = "Less500ms"
	ElapseMore500ms = "More500ms"

	CmdGet      = "GET"
	CmdGetMiss  = "GETMiss"
	CmdGetError = "GetError"
	CmdSet      = "SET"
	CmdSetError = "SetError"
	CmdAck      = "ACK"
	CmdAckError = "AckError"
	Qps         = "qps"
	Ops         = "ops"
	Accum       = "Accum"
	Latency     = "Latency"
	ToConn      = "ToConn"
	ReConn      = "ReConn"
	Elapsed     = "elapsed"
	Rebalance   = "Rebalance"
	RecvError   = "RecvError"
	BytesRead   = "BytesRead"
	BytesWriten = "BytesWriten"
	Goroutine   = "Goroutine"
	Gc          = "Gc"
	GcPauseAvg  = "GcPauseAvg"
	GcPauseMax  = "GcPauseMax"
	GcPauseMin  = "GcPauseMin"
	MemAlloc    = "MemAlloc"

	AllHost = "*"
)

Variables

This section is empty.

Functions

func AddCounter

func AddCounter(key string, value int64)

func AddGauge

func AddGauge(key string, value int64)

func AddMeter

func AddMeter(key string, value int64)

func AddTimer

func AddTimer(key string, duration int64)

func ElapseTimeString

func ElapseTimeString(t int64) string

func GetCounter

func GetCounter(key string) int64

func GetMeterRate

func GetMeterRate(key string) float64

func GetMetrics

func GetMetrics(param *QueryParam) (stat string, err error)

func GetTimerMean

func GetTimerMean(key string) float64

func LoadDataFromBytes

func LoadDataFromBytes(s []byte) error

func SaveDataToString

func SaveDataToString() string

func Start

func Start(cfg *config.Config) (err error)

func Stop

func Stop()

Types

type QueryParam

type QueryParam struct {
	Host       string
	Group      string
	Queue      string
	ActionKey  string
	MetricsKey string
	StartTime  int64
	EndTime    int64
	Step       int64
}

Jump to

Keyboard shortcuts

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