public override void Initialize()
     {
         base.Initialize();
         PerformanceHandler = new PerformanceEventHandler(
 new PerformanceEventHandlerConfiguration
 {
     Counters =
         new List<PerfomanceCounterConfiguration>
                             {
                                 new PerfomanceCounterConfiguration
                                     {
                                         Name = "Load queue reads/sec",
                                         ClearOnStart = true,
                                         CounterType = PerformanceCounterType.RateOfCountsPerSecond32,
                                         EventId = "Reads From Queue/sec",
                                         Description = "Number of reads from the queue per second"
                                     },
                             },
     CategoryName = "Wds Eligibility Load Preprocessing #",
     Description = "Eligibility load performance counters.",
     EnableSetupOnInitialization = false,
     MachineName = ".",
     Name = ""
 });
         PerformanceHandler.Enabled = true;
     }
        internal void UpdatePerformanceHandler(List<PerfomanceCounterConfiguration> counters)
        {
            this.performanceHandler = new PerformanceEventHandler(
                new PerformanceEventHandlerConfiguration
                {
                    Counters = counters,
                    CategoryName = "Tools.Monitoring.Service",
                    Description = "Tools.Monitoring performance counters.",
                    EnableSetupOnInitialization = false,
                    MachineName = ".",
                    Name = "StatsHandler"
                });

            // enable the performance handler
            this.performanceHandler.Enabled = true;
        }