Ent Lib 3.1 - Instrumentation Performance Counters are not updating

Topics: Data Access Application Block, Logging Application Block
Sep 26, 2007 at 1:18 AM
First, I ran the "Install Instrumentation" shortcut from the start menu. The counters became visible in PerfMon, but they could not be added because there were no instances.
Second, I updated the configuration of my web application so that the performance counter instrumentation was enabled. After the application was restarted the instance became visible in PerfMon.

The problem is, the logging and data access counters are not getting updated. They all stay at 0. I am positive that I am executing queries using the DAAB and writing log entries using the LAB because I am stepping through the code and causing SQL timeouts which are throwing exceptions that cause the transaction (using TransactionScope) to rollback and event log entries to be created. I have also given my thread identity administrator privileges on my development box as a last resort.

I have scanned my Application, System and Security logs thoroughly. There are no entries, by the EntLib or others, that indicate why the performance counters are not getting updated. Does anyone have any ideas?

Mark Waddle
Sep 26, 2007 at 12:30 PM

Almost all perf counters in the block's you're using are Rate/sec counters, so unless there is continuous activity they will remain zero except for brief periods of time.

Please try the repro below and see if the perf counters do get updated. If they don't, please post additional information about your scenario (who is running the app, is this an admin user or a normal user, etc).

  • Code *
static void Main(string[] args)
Console.WriteLine("Press enter to start");
for (int i = 0; i < 200; i++)


Plain config file with logging block added, + instrumentation section with perf counters enabled.