如何添加一个性能计数器类别我已经创建 [英] How can I add a performance counter to a category i have already created

查看:214
本文介绍了如何添加一个性能计数器类别我已经创建的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个PerformanceCounterCategory像下面

I have created a PerformanceCounterCategory like below

var category = PerformanceCounterCategory.Create("MyCat", "Cat Help",
    PerformanceCounterCategoryType.SingleInstance, "MyCounter", "Counter Help);

如何添加一个新的计数器类监视另一个项目?
我找不到API吧。

How can I add a new counter to the category to monitor another item?
I cannot find the api for it.

推荐答案

我做这样的研究而回,它似乎并不有可能计数器添加到现有类别,你就必须做什么重新创建同一类别并加入新的计数器。

I did a research on this a while back and it doesn't seem to be possible to add counters to an existing category, what you would have to do it to recreate the same category with addition of the new counter.

这篇关于如何添加一个性能计数器类别我已经创建的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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