statsd

package
v0.0.0-...-b8a1a0e Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2024 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ApiTypeToName = map[ApiType]string{
	Sync:                   "Sync",
	AnalyzerSync:           "AnalyzerSync",
	Upgrade:                "Upgrade",
	Query:                  "Query",
	GetKubernetesClusterID: "GetKubernetesClusterID",
	GenesisSync:            "GenesisSync",
	KubernetesAPISync:      "KubernetesAPISync",
	PrometheusAPISync:      "PrometheusAPISync",
	GetPrometheusLabelIDs:  "GetPrometheusLabelIDs",
	GetPrometheusTargets:   "GetPrometheusTargets",
	GPIDSync:               "GPIDSync",
}
View Source
var (
	VTapNameToCounter = make(map[string]*GetVTapWeightCounter)
)

Functions

func AddGPIDReceiveCounter

func AddGPIDReceiveCounter(count uint64)

func AddGPIDSendCounter

func AddGPIDSendCounter(count uint64)

func AddGrpcCostStatsd

func AddGrpcCostStatsd(apiType ApiType, cost int)

func Start

func Start()

Types

type ApiType

type ApiType int
const (
	Sync ApiType = iota
	AnalyzerSync
	Upgrade
	Query
	GetKubernetesClusterID
	GenesisSync
	KubernetesAPISync
	PrometheusAPISync
	GPIDSync
	GetPrometheusLabelIDs
	GetPrometheusTargets
	MaxApiType
)

type Counter

type Counter struct {
	ReqCount uint64 `statsd:"req_count"`
	AvgDelay uint64 `statsd:"avg_delay"`
	MaxDelay uint64 `statsd:"max_delay"`
	SumDelay uint64
}

func (*Counter) AddCostTime

func (c *Counter) AddCostTime(cost uint64)

type GCounter

type GCounter struct {
	Receive uint64 `statsd:"receive_count"`
	Send    uint64 `statsd:"send_count"`
}

func (*GCounter) AddReceiveCount

func (c *GCounter) AddReceiveCount(count uint64)

func (*GCounter) AddSendCount

func (c *GCounter) AddSendCount(count uint64)

type GPIDCounter

type GPIDCounter struct {
	*GCounter
}

func NewGPIDCounter

func NewGPIDCounter() *GPIDCounter

func (*GPIDCounter) Closed

func (g *GPIDCounter) Closed() bool

func (*GPIDCounter) GetCounter

func (g *GPIDCounter) GetCounter() interface{}

type GetPrometheusLabelIDsCounter

type GetPrometheusLabelIDsCounter struct {
	*PrometheusLabelIDsCounter
}

func GetPrometheusLabelIDsCounterSingleton

func GetPrometheusLabelIDsCounterSingleton() *GetPrometheusLabelIDsCounter

func NewGetPrometheusLabelIDsCounter

func NewGetPrometheusLabelIDsCounter() *GetPrometheusLabelIDsCounter

func (*GetPrometheusLabelIDsCounter) Closed

func (g *GetPrometheusLabelIDsCounter) Closed() bool

func (*GetPrometheusLabelIDsCounter) GetCounter

func (g *GetPrometheusLabelIDsCounter) GetCounter() interface{}

type GetVTapWeightCounter

type GetVTapWeightCounter struct {
	*VTapWeightCounter
	Name string
}

func (*GetVTapWeightCounter) Closed

func (g *GetVTapWeightCounter) Closed() bool

func (*GetVTapWeightCounter) GetCounter

func (g *GetVTapWeightCounter) GetCounter() interface{}

type GrpcCounter

type GrpcCounter struct {
	*Counter
}

func NewGrpcCounter

func NewGrpcCounter() *GrpcCounter

func (*GrpcCounter) Closed

func (g *GrpcCounter) Closed() bool

func (*GrpcCounter) GetCounter

func (g *GrpcCounter) GetCounter() interface{}

type PrometheusLabelIDsCounter

type PrometheusLabelIDsCounter struct {
	ReceiveMetricCount uint64 `statsd:"receive_metric_count"`
	ReceiveLabelCount  uint64 `statsd:"receive_label_count"`
	ReceiveTargetCount uint64 `statsd:"receive_target_count"`
	SendMetricCount    uint64 `statsd:"send_metric_count"`
	SendLabelCount     uint64 `statsd:"send_label_count"`
	SendTargetCount    uint64 `statsd:"send_target_count"`
}

func NewPrometheusLabelIDsCounter

func NewPrometheusLabelIDsCounter() *PrometheusLabelIDsCounter

func (*PrometheusLabelIDsCounter) Fill

type VTapWeightCounter

type VTapWeightCounter struct {
	Weight            float64 `statsd:"weight"`
	IsAnalyzerChanged uint64  `statsd:"is_analyzer_changed"`
}

func NewVTapWeightCounter

func NewVTapWeightCounter() *VTapWeightCounter

Jump to

Keyboard shortcuts

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