collector

package
v0.0.0-...-45a60ca Latest Latest
Warning

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

Go to latest
Published: Dec 7, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collector

type Collector struct {
	Conf *conf.Config
	// contains filtered or unexported fields
}

func NewCollector

func NewCollector() *Collector

func (*Collector) Collect

func (c *Collector) Collect(ch chan<- prometheus.Metric)

func (*Collector) Describe

func (c *Collector) Describe(ch chan<- *prometheus.Desc)

type RocketMQCollector

type RocketMQCollector struct {
	prometheus.Collector
}

解析数据文件:data.txt --> RocketMQMetricSet RocketMQMetricSet 转换成Prometheus format data 将Prometheus format data输出到标准输出

type RocketMQMetric

type RocketMQMetric struct {
	Group     string
	Count     string
	Version   string
	Type      string
	Model     string
	TPS       string
	DiffTotal string
}

func ParseLine

func ParseLine(line string) *RocketMQMetric

func (*RocketMQMetric) IntCount

func (m *RocketMQMetric) IntCount() float64

func (*RocketMQMetric) IntDiffTotal

func (m *RocketMQMetric) IntDiffTotal() float64

func (*RocketMQMetric) IntTPS

func (m *RocketMQMetric) IntTPS() float64

func (*RocketMQMetric) String

func (m *RocketMQMetric) String() string

type RocketMQMetricSet

type RocketMQMetricSet struct {
	Items []*RocketMQMetric
}

func NewRocketMQMetricSet

func NewRocketMQMetricSet() *RocketMQMetricSet

func (*RocketMQMetricSet) Add

func (s *RocketMQMetricSet) Add(item *RocketMQMetric)

func (*RocketMQMetricSet) String

func (s *RocketMQMetricSet) String() string

Jump to

Keyboard shortcuts

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