mirror of
https://github.com/shirou/gopsutil.git
synced 2025-04-26 13:48:59 +08:00
parent
c806740b34
commit
03d43fb5a2
@ -45,8 +45,8 @@ func loadAvgGoroutine(ctx context.Context) {
|
||||
|
||||
f := func() {
|
||||
currentLoad, err = counter.GetValue()
|
||||
loadErr = err
|
||||
loadAvgMutex.Lock()
|
||||
loadErr = err
|
||||
loadAvg1M = loadAvg1M*loadAvgFactor1M + currentLoad*(1-loadAvgFactor1M)
|
||||
loadAvg5M = loadAvg5M*loadAvgFactor5M + currentLoad*(1-loadAvgFactor5M)
|
||||
loadAvg15M = loadAvg15M*loadAvgFactor15M + currentLoad*(1-loadAvgFactor15M)
|
||||
|
Loading…
x
Reference in New Issue
Block a user