mirror of
https://github.com/hanzomsg/nats-server.git
synced 2026-10-30 20:27:34 +00:00
The original TestPSEmulation checked both memory and CPU usage in a single run, causing instability in CPU measurements. Splitting the test, avoids any processing in between the CPU measurements from `ps` and `ProcUsage()`, such as the invoking the garbage collector through `debug.FreeOSMemory()`. Signed-off-by: Daniele Sciascia <[email protected]>