datastatistics

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 21, 2020 License: MIT Imports: 6 Imported by: 0

README

prometheus 统计使用说明

  • <1>Counter:计数器,数据的值持续增加或持续减少。表示的是一个持续变化趋势值,用来记录当前的数量。一般用于记录当前请求数量,错误数
  • <2>Gauge:计量器(类似仪表盘)。表示当前数据的一个瞬时值,改值可任意增加或减少。一般用来记录内存使用量,磁盘使用量,文件打开数量等
  • <3>Histogram:柱状图。主要用于在一定范围内对数据进行采样,计算在一定范围内的分布情况,通常它采集的数据展示为直方图。一般用来记录请求时长或响应时长
  • <4>Summary: 对观测值(类似请求延迟或回复包大小)进行采样。同时它会给出一个总数以及所有观测值的总和,它在一个滑动的时间窗口上计算可配置的分位数。, 典型的应用如:请求持续时间,响应大小。主要做统计用,设置分位数的值,会实时返回该分位数上的值。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsExistStatisticsTitle

func IsExistStatisticsTitle(SrcTitles []string, dstTitle string) (err error)

func MonitorRoutine

func MonitorRoutine(ip string, port string)

func RegCounter

func RegCounter(model string)

func RegGauge

func RegGauge(model string)

func RegHistogram

func RegHistogram(model string)

func RegSummary

func RegSummary(model string)

Types

type AKCounter

type AKCounter struct {
	// contains filtered or unexported fields
}

func GetAKCounter

func GetAKCounter() *AKCounter

func NewAKCounter

func NewAKCounter() *AKCounter

func (*AKCounter) DoAdd

func (this *AKCounter) DoAdd(title string, val float64) (err error)

func (*AKCounter) DoInc

func (this *AKCounter) DoInc(title string) (err error)

func (*AKCounter) Init

func (this *AKCounter) Init(strName, strHelp string, titles []string)

type AKGauge

type AKGauge struct {
	// contains filtered or unexported fields
}

func GetAKGauge

func GetAKGauge() *AKGauge

func NewAKGauge

func NewAKGauge() *AKGauge

func (*AKGauge) DoAdd

func (this *AKGauge) DoAdd(title string, val float64) (err error)

func (*AKGauge) DoDec

func (this *AKGauge) DoDec(title string) (err error)

func (*AKGauge) DoInc

func (this *AKGauge) DoInc(title string) (err error)

func (*AKGauge) DoSet

func (this *AKGauge) DoSet(title string, val float64) (err error)

func (*AKGauge) DoSub

func (this *AKGauge) DoSub(title string, val float64) (err error)

func (*AKGauge) Init

func (this *AKGauge) Init(strName, strHelp string, titles []string)

type AKHistogram

type AKHistogram struct {
	// contains filtered or unexported fields
}

func GetAKHistogram

func GetAKHistogram() *AKHistogram

func NewAKHistogram

func NewAKHistogram() *AKHistogram

func (*AKHistogram) DoObserve

func (this *AKHistogram) DoObserve(title string, val float64) (err error)

func (*AKHistogram) Init

func (this *AKHistogram) Init(strName, strHelp string, titles []string)

type AKSummary

type AKSummary struct {
	// contains filtered or unexported fields
}

func GetAKSummary

func GetAKSummary() *AKSummary

func NewAKSummary

func NewAKSummary() *AKSummary

func (*AKSummary) DoObserve

func (this *AKSummary) DoObserve(title string, val float64) (err error)

func (*AKSummary) Init

func (this *AKSummary) Init(strName, strHelp string, titles []string)

Jump to

Keyboard shortcuts

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