statsd

package
v0.0.0-...-9634a1a Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2023 License: Apache-2.0 Imports: 3 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",
	GPIDSync:               "GPIDSync",
}

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
	GPIDSync
	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 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{}

Jump to

Keyboard shortcuts

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