Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
Abingcbc committed Sep 29, 2024
1 parent caf137b commit 0be2b36
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions pkg/helper/self_metrics_v2_imp.go
Original file line number Diff line number Diff line change
Expand Up @@ -238,8 +238,7 @@ func (a *averageImp) Export() map[string]string {
// if there is no value added in the last window, zero will be returned.
type maxImp struct {
sync.RWMutex
value float64
prevAvg float64
value float64
Series
}

Expand All @@ -261,7 +260,7 @@ func (m *maxImp) Set(f float64) {
func (m *maxImp) Collect() pipeline.MetricValue[float64] {
m.RLock()
defer m.RUnlock()
metric := pipeline.MetricValue[float64]{Name: m.Name(), Value: float64(m.value)}
metric := pipeline.MetricValue[float64]{Name: m.Name(), Value: m.value}
m.value = 0
return metric
}
Expand Down

0 comments on commit 0be2b36

Please sign in to comment.