性能计数器对性能的影响是什么 [英] What is the performance hit of Performance Counters

查看:370
本文介绍了性能计数器对性能的影响是什么的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

当考虑将性能计数器用作我公司基于.NET的站点时,我想知道使用它们的开销有多大.

When considering using performance counters as my companies' .NET based site, I was wondering how big the overhead is of using them.

我想让我的网站不断更新其计数器吗?还是我最好只在进行测量时才这样做?

Do I want to have my site continuously update it's counters or am I better off to only do when I measure?

推荐答案

更新对性能的影响可以忽略不计. Microsoft的意图是您总是写性能计数器.监视(或捕获)那些性能计数器将导致性能下降.因此,仅当您使用诸如perfmon之类的功能来捕获数据时.

The performance impact is negligible in updating. Microsoft's intent is that you always write to the performance counters. It's the monitoring of (or capturing of) those performance counters that will cause a degradation of performance. So, only when you use something like perfmon to capture the data.

实际上,性能计数器对象的作用只是在测量时执行".

In effect, the performance counter objects will have the effect of only "doing it when you measure."

这篇关于性能计数器对性能的影响是什么的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆