metrics

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 9, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Measure

func Measure(e zapcore.Entry) error

Measure logger level rate

func MetricsHandle added in v0.6.0

func MetricsHandle()

MetricsHandle register the metrics handle

func RegisterSDKMetrics added in v0.6.0

func RegisterSDKMetrics()

Types

type Metrics

type Metrics struct {
	//biz
	ConnectionOnlineGaugeVec *prometheus.GaugeVec

	//command
	ZTInfoCounterVec    *prometheus.CounterVec
	IsLeaderGaugeVec    *prometheus.GaugeVec
	LRangeSeekHistogram prometheus.Histogram
	GCKeysCounterVec    *prometheus.CounterVec

	//expire
	ExpireKeysTotal *prometheus.CounterVec

	//tikvGC
	TiKVGCTotal *prometheus.CounterVec

	//command biz
	CommandCallHistogramVec     *prometheus.HistogramVec
	TxnBeginHistogramVec        *prometheus.HistogramVec
	CommandFuncDoneHistogramVec *prometheus.HistogramVec
	TxnCommitHistogramVec       *prometheus.HistogramVec
	ReplyFuncDoneHistogramVec   *prometheus.HistogramVec
	CommandArgsNumHistogramVec  *prometheus.HistogramVec
	TxnRetriesCounterVec        *prometheus.CounterVec
	TxnConflictsCounterVec      *prometheus.CounterVec
	TxnFailuresCounterVec       *prometheus.CounterVec
	MultiCommandHistogramVec    *prometheus.HistogramVec

	//logger
	LogMetricsCounterVec *prometheus.CounterVec
}

Metrics prometheus statistics

func GetMetrics

func GetMetrics() *Metrics

GetMetrics return metrics object

type Server

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

Server status server

func NewServer

func NewServer(config *conf.Status) *Server

NewServer creat status server

func (*Server) GracefulStop

func (s *Server) GracefulStop() error

GracefulStop serve graceful stop

func (*Server) ListenAndServe

func (s *Server) ListenAndServe(addr string) error

ListenAndServe start the service by address

func (*Server) Serve

func (s *Server) Serve(lis net.Listener) error

Serve accepts incoming connections on the Listener l

func (*Server) Stop

func (s *Server) Stop() error

Stop Close serve fd

Jump to

Keyboard shortcuts

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