metrics

package
v0.7.3 Latest Latest
Warning

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

Go to latest
Published: Aug 16, 2018 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	RUNNING = int32(1)
	STOPPED = int32(0)
)

Variables

This section is empty.

Functions

This section is empty.

Types

type ApiMetric

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

type BufferWriter

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

func NewBufferWriter

func NewBufferWriter() *BufferWriter

func (*BufferWriter) Get

func (b *BufferWriter) Get() []byte

func (*BufferWriter) Read

func (b *BufferWriter) Read(p []byte) (n int, err error)

func (*BufferWriter) Write

func (b *BufferWriter) Write(p []byte) (n int, err error)

type DefaultOutput

type DefaultOutput struct {
}

func (*DefaultOutput) Output

func (do *DefaultOutput) Output(output interface{})

type MetricMeter

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

func NewMetricMeter

func NewMetricMeter(name string, interval time.Duration, output Output) *MetricMeter

func (*MetricMeter) AddApi

func (this *MetricMeter) AddApi(reqMethod string, ack bool)

func (*MetricMeter) AddApiWithDelay

func (this *MetricMeter) AddApiWithDelay(reqMethod string, ack bool, delay time.Duration)

func (*MetricMeter) Run

func (this *MetricMeter) Run()

func (*MetricMeter) Stop

func (this *MetricMeter) Stop()

type OpenFalconCustomData

type OpenFalconCustomData struct {
	Name        string  `json:"name,omitempty"`
	Metric      string  `json:"metric,omitempty"`
	TotalNumber uint64  `json:"number_of_request,omitempty"`
	ErrNumber   uint64  `json:"number_of_err_response,omitempty"`
	Avg         float64 `json:"average_delay_of_response,omitempty"`
	Max         float64 `json:"max_delay_of_response,omitempty"`
	Min         float64 `json:"min_delay_of_response,omitempty"`
}

type Output

type Output interface {
	Output(output interface{})
}

type TpsStats

type TpsStats struct {
	Name        string `json:"name,omitempty"`
	TotalNumber uint64 `json:"total_number,omitempty"`
	ErrNumber   uint64 `json:"err_number,omitempty"`
	Tps         uint64 `json:"tps,omitempty"`
	// min latency ms
	Min float64 `json:"min,omitempty"`
	// max latency ms
	Max float64 `json:"max,omitempty"`
	// avg latency ms
	Avg    float64 `json:"avg,omitempty"`
	Tp_10  float64 `json:"tp_10,omitempty"`
	Tp_25  float64 `json:"tp_25,omitempty"`
	Tp_50  float64 `json:"tp_50,omitempty"`
	Tp_75  float64 `json:"tp_75,omitempty"`
	Tp_90  float64 `json:"tp_90,omitempty"`
	Tp_95  float64 `json:"tp_95,omitempty"`
	Tp_99  float64 `json:"tp_99,omitempty"`
	Tp_999 float64 `json:"tp_999,omitempty"`
}

Jump to

Keyboard shortcuts

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