コード例 #1
0
        private CachingServiceItemTurnoverEvent(string[] counterNames)
        {
            InstrumentedEvent internalEvent;

            internalEvent = new InstrumentedEvent(SR.CachingInstrumentationCounterCategory,
                                                  counterNames,
                                                  true);

            turnOverInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterCacheTurnoverRate);
            totalEntriesInstances = internalEvent.GetPerformanceCounterInstances(SR.PerfCounterTotalCacheEntries);
        }
コード例 #2
0
 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)
         };
 }
コード例 #3
0
 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)
         };
 }