metrics

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultMetricsPort               = 9148
	DefaultStatisticsIntervalSeconds = 10
	TaskDelayUpdateModMask           = 1023

	TaskQPSGaugeName   = "task_qps"
	TaskDelayGaugeName = "task_delay"
)

Variables

This section is empty.

Functions

func AddEventCount

func AddEventCount()

func InitTaskMetricsSingleton

func InitTaskMetricsSingleton(taskConfig core.StringMap, logger *log.Logger) (err error)

func UpdateTaskBinlogDelay

func UpdateTaskBinlogDelay(positionTimestamp uint32)

Types

type TaskMetrics

type TaskMetrics struct {
	*core.BaseComponent
	// contains filtered or unexported fields
}
var MetricsInstance *TaskMetrics

MetricsInstance is the Global TaskMetrics singleton

func NewTaskMetrics

func NewTaskMetrics(taskName string) *TaskMetrics

func (*TaskMetrics) AddEventCount

func (m *TaskMetrics) AddEventCount()

func (*TaskMetrics) Configure

func (m *TaskMetrics) Configure(config core.StringMap) (err error)

func (*TaskMetrics) SetTaskDelay

func (m *TaskMetrics) SetTaskDelay(delay float64)

func (*TaskMetrics) Start

func (m *TaskMetrics) Start() (err error)

Jump to

Keyboard shortcuts

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