性能监视器 - 关于我在 PerfMon 中看到的内容的问题
我的问题涉及我在 Windows 性能监视器中看到的内容。我在我的 C# 应用程序中创建了一个性能计数器。当我模拟通过线程添加用户时,它测量执行操作所需的平均时间。
当我观看 PerfMon 中的性能显示时,我看到垂直红线以一秒的增量在屏幕上移动。我的问题是这样的。当线条每秒在屏幕上移动时,它到底显示什么?我看到的是该确切时间点的所有值的当前平均值,还是看到自上次更新(一秒前)以来的平均值?我所看到的让我相信是后者,但我不确定。
我认为是后者的原因是因为我有时会看到平均值下降到零(短暂地)。如果它显示的是自我启动应用程序以来所有值的平均值,那么这根本不可能。
My question concerns what I'm seeing in Windows Performance Monitor. I've created a performance counter in my C# app. It measures the average time it takes to perform an operation as I simulate adding users via threads.
As I watch the performance display in PerfMon, I see the vertical red line move across the screen in what appears to be one second increments. My question is this. Exactly what is it displaying as the line moves across the screen every one second? Am I seeing the current average of all values at that exact point in time, or am I seeing the average of values since the last update (one second ago)? What I'm seeing leads me believe it's the latter but I'm not sure.
The reason I think it's the latter is because I sometimes see the average fall to zero (briefly). This simply couldn't be if it were showing the average of all values since I started my app.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以创建具有不同采样率的收集器集。不同的计数器代表不同的值——一个可能是总值,另一个可能是每秒的频率值。当您单击 PerfMon 中的各个计数器时,大多数计数器还会以数字方式显示当前/最后/平均/最大读数。
You can create collector sets with different sampling rates. Different counters represent different values -- one might be a total value, another might be a per-second frequency value. Most counters also display current/last/average/max readings numerically when you click on the individual counter in PerfMon.