Skip to content

Commit 1003f4b

Browse files
committed
Amended typo in pods_performance_replication_collector.go
1 parent e06dfc4 commit 1003f4b

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

internal/openmetrics-exporter/pods_performance_replication_collector.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ func (c *PodsPerformanceReplicationCollector) Collect(ch chan<- prometheus.Metri
2525
c.BandwidthDesc,
2626
prometheus.GaugeValue,
2727
p.ContinuousBytesPerSec.FromRemoteBytesPerSec,
28-
"continuos", "from_remote", p.Pod.Name,
28+
"continuous", "from_remote", p.Pod.Name,
2929
)
3030
ch <- prometheus.MustNewConstMetric(
3131
c.BandwidthDesc,
@@ -49,7 +49,7 @@ func (c *PodsPerformanceReplicationCollector) Collect(ch chan<- prometheus.Metri
4949
c.BandwidthDesc,
5050
prometheus.GaugeValue,
5151
p.ContinuousBytesPerSec.ToRemoteBytesPerSec,
52-
"continuos", "to_remote", p.Pod.Name,
52+
"continuous", "to_remote", p.Pod.Name,
5353
)
5454
ch <- prometheus.MustNewConstMetric(
5555
c.BandwidthDesc,
@@ -73,7 +73,7 @@ func (c *PodsPerformanceReplicationCollector) Collect(ch chan<- prometheus.Metri
7373
c.BandwidthDesc,
7474
prometheus.GaugeValue,
7575
p.ContinuousBytesPerSec.TotalBytesPerSec,
76-
"continuos", "total", p.Pod.Name,
76+
"continuous", "total", p.Pod.Name,
7777
)
7878
ch <- prometheus.MustNewConstMetric(
7979
c.BandwidthDesc,

internal/openmetrics-exporter/pods_performance_replication_collector_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -37,15 +37,15 @@ func TestPodsPerformanceReplicationCollector(t *testing.T) {
3737
defer server.Close()
3838
want := make(map[string]bool)
3939
for _, p := range pods.Items {
40-
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuos\" > label:<name:\"direction\" value:\"from_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.FromRemoteBytesPerSec)] = true
40+
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuous\" > label:<name:\"direction\" value:\"from_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.FromRemoteBytesPerSec)] = true
4141
want[fmt.Sprintf("label:<name:\"dimension\" value:\"resync\" > label:<name:\"direction\" value:\"from_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ResyncBytesPerSec.FromRemoteBytesPerSec)] = true
4242
want[fmt.Sprintf("label:<name:\"dimension\" value:\"sync\" > label:<name:\"direction\" value:\"from_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.SyncBytesPerSec.FromRemoteBytesPerSec)] = true
4343
want[fmt.Sprintf("label:<name:\"dimension\" value:\"periodic\" > label:<name:\"direction\" value:\"from_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.PeriodicBytesPerSec.FromRemoteBytesPerSec)] = true
44-
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuos\" > label:<name:\"direction\" value:\"to_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.ToRemoteBytesPerSec)] = true
44+
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuous\" > label:<name:\"direction\" value:\"to_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.ToRemoteBytesPerSec)] = true
4545
want[fmt.Sprintf("label:<name:\"dimension\" value:\"resync\" > label:<name:\"direction\" value:\"to_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ResyncBytesPerSec.ToRemoteBytesPerSec)] = true
4646
want[fmt.Sprintf("label:<name:\"dimension\" value:\"sync\" > label:<name:\"direction\" value:\"to_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.SyncBytesPerSec.ToRemoteBytesPerSec)] = true
4747
want[fmt.Sprintf("label:<name:\"dimension\" value:\"periodic\" > label:<name:\"direction\" value:\"to_remote\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.PeriodicBytesPerSec.ToRemoteBytesPerSec)] = true
48-
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuos\" > label:<name:\"direction\" value:\"total\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.TotalBytesPerSec)] = true
48+
want[fmt.Sprintf("label:<name:\"dimension\" value:\"continuous\" > label:<name:\"direction\" value:\"total\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ContinuousBytesPerSec.TotalBytesPerSec)] = true
4949
want[fmt.Sprintf("label:<name:\"dimension\" value:\"resync\" > label:<name:\"direction\" value:\"total\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.ResyncBytesPerSec.TotalBytesPerSec)] = true
5050
want[fmt.Sprintf("label:<name:\"dimension\" value:\"sync\" > label:<name:\"direction\" value:\"total\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.SyncBytesPerSec.TotalBytesPerSec)] = true
5151
want[fmt.Sprintf("label:<name:\"dimension\" value:\"periodic\" > label:<name:\"direction\" value:\"total\" > label:<name:\"name\" value:\"%s\" > gauge:<value:%g > ", p.Pod.Name, p.PeriodicBytesPerSec.TotalBytesPerSec)] = true

0 commit comments

Comments
 (0)