diff options
| author | Ammar Askar <ammar@ammaraskar.com> | 2019-09-15 07:46:39 -0400 |
|---|---|---|
| committer | Giampaolo Rodola <g.rodola@gmail.com> | 2019-09-15 13:46:39 +0200 |
| commit | 3c7ef4e20e284431c2471f89ac6afc174d4e2af8 (patch) | |
| tree | 267055498fa1c7ac36b6dbf7ffabb1d90ab1655b | |
| parent | 5206cff82bc2ff68331f2ccaf8960d9b06c24956 (diff) | |
| download | psutil-3c7ef4e20e284431c2471f89ac6afc174d4e2af8.tar.gz | |
Correct loadavg constants for 5 and 15 minutes. Fixes #1552 (#1583)
| -rw-r--r-- | psutil/arch/windows/wmi.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/psutil/arch/windows/wmi.c b/psutil/arch/windows/wmi.c index 5858a9e0..f43d790c 100644 --- a/psutil/arch/windows/wmi.c +++ b/psutil/arch/windows/wmi.c @@ -22,8 +22,8 @@ // This formula comes from linux's include/linux/sched/loadavg.h // https://github.com/torvalds/linux/blob/345671ea0f9258f410eb057b9ced9cefbbe5dc78/include/linux/sched/loadavg.h#L20-L23 #define LOADAVG_FACTOR_1F 0.9200444146293232478931553241 -#define LOADAVG_FACTOR_5F 0.6592406302004437462547604110 -#define LOADAVG_FACTOR_15F 0.2865047968601901003248854266 +#define LOADAVG_FACTOR_5F 0.9834714538216174894737477501 +#define LOADAVG_FACTOR_15F 0.9944598480048967508795473394 // The time interval in seconds between taking load counts, same as Linux #define SAMPLING_INTERVAL 5 @@ -112,4 +112,4 @@ error: PyObject * psutil_get_loadavg(PyObject *self, PyObject *args) { return Py_BuildValue("(ddd)", load_avg_1m, load_avg_5m, load_avg_15m); -}
\ No newline at end of file +} |
