mirror of
https://github.com/octoleo/syncthing.git
synced 2025-02-08 23:08:27 +00:00
cmd/syncthing: Fix CPU usage reporting (tick time)
This commit is contained in:
parent
b17d7d8126
commit
ec137c9522
@ -848,8 +848,9 @@ func (s *apiService) flushResponse(resp string, w http.ResponseWriter) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 10 second average. Magic alpha value comes from looking at EWMA package
|
// 10 second average. Magic alpha value comes from looking at EWMA package
|
||||||
// definitions of EWMA1, EWMA5.
|
// definitions of EWMA1, EWMA5. The tick rate *must* be five seconds (hard
|
||||||
var cpuTickRate = 2 * time.Second
|
// coded in the EWMA package).
|
||||||
|
var cpuTickRate = 5 * time.Second
|
||||||
var cpuAverage = metrics.NewEWMA(1 - math.Exp(-float64(cpuTickRate)/float64(time.Second)/10.0))
|
var cpuAverage = metrics.NewEWMA(1 - math.Exp(-float64(cpuTickRate)/float64(time.Second)/10.0))
|
||||||
|
|
||||||
func init() {
|
func init() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user