Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
colixxxx committed Sep 29, 2023
1 parent 7b67029 commit 3a724ba
Showing 1 changed file with 15 additions and 15 deletions.
30 changes: 15 additions & 15 deletions plugins/aggregators/basicstats/basicstats.go
Original file line number Diff line number Diff line change
Expand Up @@ -177,21 +177,21 @@ func (b *BasicStats) Push(acc telegraf.Accumulator) {
fields[k+b.SumSuffix] = v.sum
}

// if b.statsConfig.count {
// fields[k+"b.countSuffix"] = v.count
// }
// if b.statsConfig.min {
// fields[k+"b.minSuffix"] = v.min
// }
// if b.statsConfig.max {
// fields[k+"b.maxSuffix"] = v.max
// }
// if b.statsConfig.mean {
// fields[k+"b.meanSuffix"] = v.mean
// }
// if b.statsConfig.sum {
// fields[k+"b.sumSuffix"] = v.sum
// }
if b.statsConfig.count {
fields[k+b.CountSuffix] = v.count
}
if b.statsConfig.min {
fields[k+b.MinSuffix] = v.min
}
if b.statsConfig.max {
fields[k+b.MaxSuffix] = v.max
}
if b.statsConfig.mean {
fields[k+b.MeanSuffix] = v.mean
}
if b.statsConfig.sum {
fields[k+b.SumSuffix] = v.sum
}

//v.count always >=1
if v.count > 1 {
Expand Down

0 comments on commit 3a724ba

Please sign in to comment.