Skip to content

Commit

Permalink
reorder arguments
Browse files Browse the repository at this point in the history
Signed-off-by: Mikhail Scherba <[email protected]>
  • Loading branch information
miklezzzz committed Oct 8, 2024
1 parent d2239c3 commit f196e16
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/metric_storage/vault/vault.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (v *GroupedVault) ExpireGroupMetrics(group string) {
}

// ExpireGroupMetricsByName takes a collector by its name and clear all metrics by group.
func (v *GroupedVault) ExpireGroupMetricsByName(name, group string) {
func (v *GroupedVault) ExpireGroupMetricsByName(group, name string) {
v.mtx.Lock()
collector, ok := v.collectors[name]
if ok {
Expand Down
2 changes: 1 addition & 1 deletion pkg/metric_storage/vault/vault_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ metric_total4{a="", b="", c="", d="", j=""} 29
metric_total4{a="", b="", c="", d="", j="j1"} 41
`

v.ExpireGroupMetricsByName("metric_total5", "group3")
v.ExpireGroupMetricsByName("group3", "metric_total5")
err = promtest.GatherAndCompare(prometheus.DefaultGatherer, strings.NewReader(expect), "metric_total1", "metric_total2", "metric_totalr3", "metric_total4", "metric_total5")
g.Expect(err).ShouldNot(HaveOccurred())
}

0 comments on commit f196e16

Please sign in to comment.