.NET 4.0 MemoryCache性能计数器在哪里? [英] Where are .NET 4.0 MemoryCache performance counters?

查看:115
本文介绍了.NET 4.0 MemoryCache性能计数器在哪里?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

.NET 4.0 MemoryCache性能计数器在哪里?

Where are .NET 4.0 MemoryCache performance counters?

我正在寻找它们的名称,但找不到。

I am looking for their name and I can't find any.

谢谢

推荐答案

这是一个很长的问题,答案很长。我怀疑这会有所帮助,让我们谈谈您要解决的 real 问题。必须先注册这些性能计数器,然后才能看到它们。

That's a loaded question with a very long answer. I doubt it is going to be helpful, let's talk about the real problem you are trying to solve. Those performance counters have to be registered first before you can see them.

启动提升的控制台提示符(右键单击快捷方式并使用以管理员身份运行)并键入以下命令:

Start an elevated console prompt (right-click the shortcut and use Run as Administrator) and type these commands:

cd C:\Windows\Microsoft.NET\Framework\v4.0.30319
lodctr netmemorycache.ini

这将添加必需的注册表项,以便MemoryCache可以在运行时创建这些计数器。启动程序,以便创建MemoryCache实例。运行Perfmon.exe,右键单击该图,添加计数器,然后从添加的 .NET Memory Cache 4.0类别中进行选择。还要选择程序的实例。

That adds the required registry entries so the MemoryCache can create these counters at runtime. Start your program so an instance of MemoryCache is created. Run Perfmon.exe, right-click the graph, Add Counters and pick from the added ".NET Memory Cache 4.0" category. Also select the instance of your program.

这篇关于.NET 4.0 MemoryCache性能计数器在哪里?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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