I'm wondering if you have tested on Linux? Specifically on Ubuntu 20.04 I'm seeing cpu-usage being reported as 50 times to high, and Resident memory usage around 136 times too low. Open files, and virtual memory usage seem ok.
Here are reported numbers from swift-metrics-extra:
# TYPE process_cpu_seconds_total gauge
process_cpu_seconds_total 3210.0
# TYPE process_virtual_memory_bytes gauge
process_virtual_memory_bytes 5309480960.0
# TYPE process_resident_memory_bytes gauge
process_resident_memory_bytes 381720.0
At the same time here are numbers from ps:
ps axuww
USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
...
thw 1608868 0.0 0.0 5185040 50896 pts/5 Sl Dec05 1:04 .build/release/BuapiWebService
Memory numbers from ps are in 1024 bytes, so ps reports 5_309_480_960 for vmem which matches swift-extras 5_309_480_960.
But for rss ps reports 52_117_504 where this package reports 381_720, and for cpu-usage ps reports 1:04 which is 64 seconds, but this package reports 3210
Swift & OS version (output of swift --version && uname -a)
Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Linux smkepyc 5.15.0-122-generic #132~20.04.1-Ubuntu SMP Fri Aug 30 15:50:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
I'm wondering if you have tested on Linux? Specifically on Ubuntu 20.04 I'm seeing cpu-usage being reported as 50 times to high, and Resident memory usage around 136 times too low. Open files, and virtual memory usage seem ok.
Here are reported numbers from swift-metrics-extra:
At the same time here are numbers from ps:
Memory numbers from ps are in 1024 bytes, so ps reports 5_309_480_960 for vmem which matches swift-extras 5_309_480_960.
But for rss ps reports 52_117_504 where this package reports 381_720, and for cpu-usage ps reports 1:04 which is 64 seconds, but this package reports 3210
Swift & OS version (output of
swift --version && uname -a)Swift version 6.0.2 (swift-6.0.2-RELEASE)
Target: x86_64-unknown-linux-gnu
Linux smkepyc 5.15.0-122-generic #132~20.04.1-Ubuntu SMP Fri Aug 30 15:50:07 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux