Hyperic SIGAR CpuTimer 类:挂钟时间还是 CPU 时间?

发布于 2025-01-02 21:10:59 字数 243 浏览 3 评论 0原文

有谁知道 SIGAR CPUTimer 类是否跟踪挂钟时间或调用它的程序所花费的 cpu 时间?我在谷歌上搜索过但没有结果。他们的文档也非常少,所以我无法弄清楚这个类是否使用来自 CPU 本身的 CPU 高分辨率性能计时器(我们进行测量的 CPU 具有该计时器),或者它实际上做了细粒度的计时器。测量程序挂钟时间。

PS:不,我对使用 Java 的方法 System.currentTimeMillis() 不感兴趣:)

Does anyone know if the SIGAR CPUTimer class keeps track of the wall-clock time or the cpu time spend on the program that calls it? I've searched in Google but to no avail. Their documentation also is very minimal at its best so I can't figure out whether this class uses CPU high-resolution performance timers from the CPU itself (the CPU's in which we are taking measurements have that) or it actually does a fine-grained measurement of program wall-clock time.

P.S.: And no, I am not interested in using Java's method System.currentTimeMillis() :)

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

眼藏柔 2025-01-09 21:10:59

你可以下载sigar源码自己看一下。源代码根本没有那么大。我相信您很快就会找到正确的代码。

You can download the sigar source code and look at it yourself. The source code is not that big at all. I am sure you will be looking in to the right code in no time.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文