metrics

package
v0.0.0-...-de09c22 Latest Latest
Warning

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

Go to latest
Published: May 21, 2025 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// 任务 CPU 使用率
	TaskCPUUsage = "beepf_task_cpu_usage"
	// 任务每秒事件数
	TaskEventsPerSecond = "beepf_task_events_per_second"
	// 任务平均运行时间(ns)
	TaskAvgRunTimeNS = "beepf_task_avg_run_time_ns"
	// 任务总平均运行时间(ns)
	TaskTotalAvgRunTimeNS = "beepf_task_total_avg_run_time_ns"
	// 任务采样周期(ns)
	TaskPeriodNS = "beepf_task_period_ns"
)

Variables

View Source
var (
	TaskMetricsLabels = []string{"task_id", "component_id", "program_id", "node_name"}
)

Functions

This section is empty.

Types

type NodeMetricsCollector

type NodeMetricsCollector struct {
	*topology.NodeMetricsCollector
}

func NewNodeMetricsCollector

func NewNodeMetricsCollector(interval time.Duration, logger *zap.Logger) (*NodeMetricsCollector, error)

func (*NodeMetricsCollector) GetMetrics

func (c *NodeMetricsCollector) GetMetrics() (map[uint32]*meta.ProgMetricsStats, error)

type TaskMetrics

type TaskMetrics struct {
	TaskStore *sync.Map
	TaskStats *TaskStatsMetrics
}

func NewTaskMetrics

func NewTaskMetrics(store *sync.Map) *TaskMetrics

func (*TaskMetrics) Handler

func (m *TaskMetrics) Handler() gin.HandlerFunc

func (*TaskMetrics) ResetMetrics

func (m *TaskMetrics) ResetMetrics()

func (*TaskMetrics) UpdateMetricsFromCache

func (m *TaskMetrics) UpdateMetricsFromCache(nodeName string)

type TaskStatsMetrics

type TaskStatsMetrics struct {
	TaskCPUUsage          *prometheus.GaugeVec
	TaskEventsPerSecond   *prometheus.GaugeVec
	TaskAvgRunTimeNS      *prometheus.GaugeVec
	TaskTotalAvgRunTimeNS *prometheus.GaugeVec
	TaskPeriodNS          *prometheus.GaugeVec
}

func NewTaskStatsMetrics

func NewTaskStatsMetrics() *TaskStatsMetrics

Jump to

Keyboard shortcuts

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