mirror of
https://github.com/henrygd/beszel.git
synced 2025-12-17 02:36:17 +01:00
The Docker daemon's API returns different values on Windows and non-Windows systems. This impacts the calculation of `cpuPct` and `usedMemory` for each container. The systems are disciminate on the `Server` header send by the server. Uses the unix stats calculation in case the header is not set. `docker stats` implementation for reference: https://github.com/docker/cli/blob/master/cli/command/container/stats_helpers.go#L100 Co-authored-by: Benoit VIRY <benoit.viry@cgx-group.com>