mirror of https://github.com/prometheus/prometheus
Remove superfluous nil check in Group.metrics
Signed-off-by: Marco Pracucci <marco@pracucci.com>pull/12946/head
parent
046cd7599f
commit
cbbbd6e70a
|
@ -592,9 +592,8 @@ func (g *Group) Eval(ctx context.Context, ts time.Time) {
|
|||
}
|
||||
|
||||
wg.Wait()
|
||||
if g.metrics != nil {
|
||||
g.metrics.GroupSamples.WithLabelValues(GroupKey(g.File(), g.Name())).Set(samplesTotal.Load())
|
||||
}
|
||||
|
||||
g.metrics.GroupSamples.WithLabelValues(GroupKey(g.File(), g.Name())).Set(samplesTotal.Load())
|
||||
g.cleanupStaleSeries(ctx, ts)
|
||||
}
|
||||
|
||||
|
|
|
@ -679,6 +679,7 @@ func TestDeletedRuleMarkedStale(t *testing.T) {
|
|||
Appendable: st,
|
||||
RuleConcurrencyController: sequentialRuleEvalController{},
|
||||
},
|
||||
metrics: NewGroupMetrics(nil),
|
||||
}
|
||||
newGroup.CopyState(oldGroup)
|
||||
|
||||
|
|
Loading…
Reference in New Issue