Using Custom Performance Counters

Code profiling for .NET developers.

Moderator: dom.smith

Using Custom Performance Counters

Postby schwartz » Fri Dec 13, 2013 3:56 pm

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.
Code: Select all
<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
 
Posts: 4
Joined: Thu Dec 12, 2013 11:33 pm

Postby Chris.Allen » Mon Dec 16, 2013 2:47 pm

You could try a:

lodctr /R

to rebuild the little devils.
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby schwartz » Mon Dec 16, 2013 4:20 pm

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
 
Posts: 4
Joined: Thu Dec 12, 2013 11:33 pm

Postby Chris.Allen » Tue Dec 17, 2013 6:26 pm

Just to check- you do get the counter to appear in the list, don't you?

[/img]
Chris.Allen
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby schwartz » Tue Dec 17, 2013 7:35 pm

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
 
Posts: 4
Joined: Thu Dec 12, 2013 11:33 pm

Postby Chris.Allen » Thu Dec 19, 2013 5:10 pm

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
 
Posts: 594
Joined: Thu Mar 12, 2009 4:17 pm

Postby schwartz » Thu Dec 19, 2013 5:59 pm

Ok, good to know. Let me know if I can provide you with any additional information.
schwartz
 
Posts: 4
Joined: Thu Dec 12, 2013 11:33 pm


Return to ANTS Performance Profiler 8

Who is online

Users browsing this forum: No registered users and 0 guests