Tags: anxuanzi/oneuptime-infrastructure-agent-go
Tags
✨ Update CPU metrics calculation method and add test The CPU metrics calculation method in cpu.go has been updated with a more accurate method, which involves getting CPU times at the start, waiting for a short interval, then getting CPU times again and calculating the difference. An additional function, totalCPUTime, has been implemented to facilitate this. A new test case for CPU usage calculation has also been added in cpu_test.go.