Skip to content

Commit ea27464

Browse files
committed
refactor: update the netdev_qdisc description
Signed-off-by: Tonghao Zhang <tonghao@bamaicloud.com>
1 parent 0abcc35 commit ea27464

File tree

1 file changed

+7
-14
lines changed

1 file changed

+7
-14
lines changed

core/metrics/netdev_qdisc.go

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,20 +110,13 @@ func (c *qdiscCollector) Update() ([]*metric.Data, error) {
110110
for _, oneQdisc := range netdevQdisc {
111111
tags := map[string]string{"device": oneQdisc.ifaceName, "kind": oneQdisc.kind}
112112
metrics = append(metrics,
113-
metric.NewCounterData("bytes_total", float64(oneQdisc.bytes),
114-
"Number of bytes sent.", tags),
115-
metric.NewCounterData("packets_total", float64(oneQdisc.packets),
116-
"Number of packets sent.", tags),
117-
metric.NewCounterData("drops_total", float64(oneQdisc.drops),
118-
"Number of packet drops.", tags),
119-
metric.NewCounterData("requeues_total", float64(oneQdisc.requeues),
120-
"Number of packets dequeued, not transmitted, and requeued.", tags),
121-
metric.NewCounterData("overlimits_total", float64(oneQdisc.overlimits),
122-
"Number of packet overlimits.", tags),
123-
metric.NewGaugeData("current_queue_length", float64(oneQdisc.qlen),
124-
"Number of packets currently in queue to be sent.", tags),
125-
metric.NewGaugeData("backlog", float64(oneQdisc.backlog),
126-
"Number of bytes currently in queue to be sent.", tags),
113+
metric.NewCounterData("bytes_total", float64(oneQdisc.bytes), "number of bytes sent.", tags),
114+
metric.NewCounterData("packets_total", float64(oneQdisc.packets), "number of packets sent.", tags),
115+
metric.NewCounterData("drops_total", float64(oneQdisc.drops), "number of packet drops.", tags),
116+
metric.NewCounterData("requeues_total", float64(oneQdisc.requeues), "number of packets dequeued, not transmitted, and requeued.", tags),
117+
metric.NewCounterData("overlimits_total", float64(oneQdisc.overlimits), "number of packet overlimits.", tags),
118+
metric.NewGaugeData("current_queue_length", float64(oneQdisc.qlen), "number of packets currently in queue to be sent.", tags),
119+
metric.NewGaugeData("backlog", float64(oneQdisc.backlog), "number of bytes currently in queue to be sent.", tags),
127120
)
128121
}
129122
}

0 commit comments

Comments
 (0)