mosn / holmes

self-aware Golang profile dumper
Apache License 2.0
1.06k stars 135 forks source link

feature: print the CPU usage during sampling cpu profile #126

Open doujiang24 opened 1 year ago

doujiang24 commented 1 year ago

The cpu profile may missing the CPU usage high time, when CPU usage goes down quickly. eg. https://github.com/mosn/holmes/issues/123#issuecomment-1257762975

we may record the CPU usage during sampling the CPU profile, and log it. eg. we can start another goroutine, and log CPU usage continuously.

songzhibin97 commented 1 year ago

During the configuration file change? Is it feasible to pull up the new one before turning off the old one?

doujiang24 commented 1 year ago

During the configuration file change? Is it feasible to pull up the new one before turning off the old one?

跟配置变化没关系呢 这里说的是,检查的时候,CPU 是异常,但是采样的时候,CPU 又恢复了的情况,这期间有那么几秒钟间隔

dumbFeng commented 1 year ago

监控到异常时,已经通过scene传递了cpu使用率。

doujiang24 commented 1 year ago

@dumbFeng 我说的是,采样期间的 cpu 使用率呢,这中间有一个时间差的。 目前 scene 透出的是触发采样的数据,并不是采样期间的(采样会有好几秒)