Skip to content

Commit

Permalink
task cpu: replace magic value with variable
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Nov 24, 2023
1 parent 7c5c9ee commit 08627fc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkg/snclient/task_check_system.go
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,8 @@ func (c *CheckSystemHandler) update(create bool) {
}
c.snc.Counter.SetAny("cpuinfo", "info", times)

trimData := time.Now().Add(-30 * time.Minute)
// remove interface not updated within the bufferLength
trimData := time.Now().Add(time.Duration(c.bufferLength) * time.Second)
for key, val := range netdata {
// create interface on demand
if c.snc.Counter.Get("net", key) == nil {
Expand Down

0 comments on commit 08627fc

Please sign in to comment.