/// <summary>
 /// Initializes static members of the <see cref="T:Sitecore.Diagnostics.PerformanceCounters.CachingCount" /> class.
 /// </summary>
 static MyCachingCounters()
 {
     try
     {
         MyCachingCounters.CacheClearings = new AmountPerSecondCounter(CacheClearingsName, CategoryName);
         MyCachingCounters.CacheHits      = new AmountPerSecondCounter(CacheHitsName, CategoryName);
         MyCachingCounters.CacheMisses    = new AmountPerSecondCounter(CacheMissesName, CategoryName);
     }
     catch (Exception)
     {
     }
 }
Exemplo n.º 2
0
 public SitecorePerformanceCounterMetric(AmountPerSecondCounter counter)
 {
     _counter = counter;
 }