How can we help you today? How can we help you today?

Using Custom Performance Counters

I'm trying to profile an application which uses the .NET cache API and would like to be able to see the cache state (hits/misses/entries, etc).

I've tried adding the counters to the UserCounters.xml, however, they are not returning any data. A sample of what I'm trying to do in the xml is show below. Any help would be appreciated.
<Category Name="ASP.NET Applications"> 
  <Counter Category="ASP.NET Applications" Name="Cache API Entries" Units="Number"> 
      <Instanced />
  </Counter>
</Category>

Update: I was able to access the same counter with PerfMon and it showed the expected results. So I do know that the counter is working.
schwartz
0

Comments

6 comments

  • Chris.Allen
    You could try a:

    lodctr /R

    to rebuild the little devils.
    Chris.Allen
    0
  • schwartz
    I tried rebuilding the counters as suggested but they still don't provide any data while profiling. I did not see any errors in the event log from rebuilding either.
    schwartz
    0
  • Chris.Allen
    Just to check- you do get the counter to appear in the list, don't you?

    [/img]
    Chris.Allen
    0
  • schwartz
    Yeah, the counters are in the list and are shown in the "Chart Counters" tab of the timeline.
    If I set the counter as the "main counter" and use the "Selected point" tab it says "Cache API Entries: No data". The timeline graphs also don't show any data for the cache counters - I can see the default counters perfectly fine.
    schwartz
    0
  • Chris.Allen
    I've tried many different combinations of things and it looks like this feature is broken, sorry. I am now compiling a bug report for it.
    Chris.Allen
    0
  • schwartz
    Ok, good to know. Let me know if I can provide you with any additional information.
    schwartz
    0

Add comment

Please sign in to leave a comment.