private CachingServiceItemTurnoverEvent(string[] counterNames) { InstrumentedEvent internalEvent; internalEvent = new InstrumentedEvent(SR.CachingInstrumentationCounterCategory, counterNames, true); turnOverInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheTurnoverRate); totalEntriesInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterTotalCacheEntries); }
private CachingServiceItemReadEvent(string[] counterNames) { internalEvent = new InstrumentedEvent( SR.CachingInstrumentationCounterCategory, counterNames, true); perfCounters = new PerformanceCounterInstances[] { internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheHitsSec), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheMissesSec), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheAccessAttempts), internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheHitRatio) }; }
private SecurityCacheReadEvent(string[] counterNames) { internalEvent = new InstrumentedEvent( SR.InstrumentationCounterCategory, counterNames, true); perfCounters = new PerformanceCounterInstances[] { internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheHits].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheMisses].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.TotalCacheReads].CounterName), internalEvent.GetPerformanceCounterInstances(SecurityServiceEvent.Counters[(int)SecurityServiceEvent.CounterID.CacheHitRatio].CounterName) }; }