开发者

How to go from CPU time to CPU utilization?

I'm trying to recognize a run away threads in my own application and close them for good before they render machine inaccessible.

However, I can only get CPU time for the thread, that is limitation of API I'm using. Is there any way to evaluate CPU utilization from that da开发者_开发百科ta?

I was thinking about comparing it to real time and if it is close - than that thread is loading CPU too much. What do you think about that heuristic, will it work?


CPU time divided by real time will give you CPU utilization.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜