mirror of
https://github.com/henrygd/beszel.git
synced 2026-08-23 08:36:31 +00:00
Every other metric in getSystemStats is stored through utils.TwoDecimals. The load averages were assigned straight from gopsutil, so whatever the platform reported was recorded verbatim. On Linux that goes unnoticed because /proc/loadavg is already two decimal places. Everywhere else it is not. macOS and BSD divide a fixed point value by fscale and produce numbers like 2.55322265625, and the Windows implementation synthesises the average as a decaying EWMA over the processor queue length counter, so an idle machine reports values like 1.3667392689044936e-73 instead of 0. The hub already treats two decimals as the canonical precision for this field, since records.go rounds the load average when it averages records. That left the raw agent records as the only place carrying full precision.