如何解释 ASP.NET Requests/sec 性能计数器的值?
如果我每 N 秒监控一次 ASP.NET Requests/sec 性能计数器,我应该如何解释这些值?是采样间隔内处理的请求数除以 N 吗?或者无论采样间隔如何,它都是当前请求/秒?
If I monitor ASP.NET Requests/sec performance counter every N seconds, how should I interpret the values? Is it number of requests processed during sample interval divided by N? or is it current requests/sec regardless the sample interval?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
它取决于您的N 秒数值。巧合的是,这也是性能计数器在初始化后第一个 nextValue() 上始终读取 0 的原因。它的所有计算都是相对于您调用 nextValue() 的最后一个点进行的。
您可能还需要注意以小于一秒的间隔调用计数器 nextValue() 函数,因为它可能会产生一些非常奇怪的异常结果。对于我的使用,每 5 秒调用该函数可以在最新信息和平滑平均值之间提供良好的平衡。
It is dependent upon your N number of seconds value. Which coincidentally is also why the performance counter will always read 0 on its first nextValue() after being initialized. It makes all of its calculations relatively from the last point at which you called nextValue().
You may also want to beware of calling your counters nextValue() function at intervals less than a second as it can tend to produce some very outlandish outlier results. For my uses, calling the function every 5 seconds provides a good balance between up to date information, and smooth average.