public void SetUp()
        {
            formatter = new NoPrefixNameFormatter();
            formattedInstanceName = formatter.CreateName(instanceName);

            validationCallsCounter = new PerformanceCounter(counterCategoryName, "Number of Validation Calls", formattedInstanceName, false);
            validationCallsCounter.RawValue = 0;

            validationCallsPerSecCounter = new PerformanceCounter(counterCategoryName, "Validation Calls/sec", formattedInstanceName, false);
            validationCallsPerSecCounter.RawValue = 0;

            validationSucceededCounter = new PerformanceCounter(counterCategoryName, "Number of Validation Successes", formattedInstanceName, false);
            validationSucceededCounter.RawValue = 0;

            validationSucceededPerSecond = new PerformanceCounter(counterCategoryName, "Validation Successes/sec", formattedInstanceName, false);
            validationSucceededPerSecond.RawValue = 0;

            validationFailures = new PerformanceCounter(counterCategoryName, "Number of Validation Failures", formattedInstanceName, false);
            validationFailures.RawValue = 0;

            validationFailuresPerSecond = new PerformanceCounter(counterCategoryName, "Validation Failures/sec", formattedInstanceName, false);
            validationFailuresPerSecond.RawValue = 0;

            percentageValidationSuccesses = new PerformanceCounter(counterCategoryName, "% Validation Successes", formattedInstanceName, false);
            percentageValidationSuccesses.RawValue = 0;

            percentageValidationSuccessesBase = new PerformanceCounter(counterCategoryName, "% Validation Successes Base", formattedInstanceName, false);
            percentageValidationSuccessesBase.RawValue = 0;
        }
		public void SetUp()
		{
			formatter = new NoPrefixNameFormatter();
			formattedInstanceName = formatter.CreateName(instanceName);

			cacheHitsCounter = CreatePerformanceCounter("Cache Hits/sec", formattedInstanceName);
			cacheHitsCounter.RawValue = 0;
			cacheMissesCounter = CreatePerformanceCounter("Cache Misses/sec", formattedInstanceName);
			cacheMissesCounter.RawValue = 0;
			cacheHitRatioCounter = CreatePerformanceCounter("Cache Hit Ratio", formattedInstanceName);
			cacheHitRatioCounter.RawValue = 0;
			cacheAccessAttemptsCounter = CreatePerformanceCounter("Total # of Cache Access Attempts", formattedInstanceName);
			cacheAccessAttemptsCounter.RawValue = 0;

			cacheExpiriesCounter = CreatePerformanceCounter("Cache Expiries/sec", formattedInstanceName);
			cacheExpiriesCounter.RawValue = 0;

			cacheScavengedItemsCounter = CreatePerformanceCounter("Cache Scavenged Items/sec", formattedInstanceName);
			cacheScavengedItemsCounter.RawValue = 0;

			cacheTotalEntriesCounter = CreatePerformanceCounter("Total Cache Entries", formattedInstanceName);
			cacheTotalEntriesCounter.RawValue = 0;
			cacheUpdatedEntriesCounter = CreatePerformanceCounter("Updated Entries/sec", formattedInstanceName);
			cacheUpdatedEntriesCounter.RawValue = 0;
		}
        public void SetUp()
        {
            formatter = new NoPrefixNameFormatter();
            formattedInstanceName = formatter.CreateName(instanceName);

            enabledProvider = new CachingInstrumentationProvider(instanceName, true, true, formatter);

            cacheHitsCounter = CreatePerformanceCounter("Cache Hits/sec", formattedInstanceName);
            cacheHitsCounter.RawValue = 0;
            cacheMissesCounter = CreatePerformanceCounter("Cache Misses/sec", formattedInstanceName);
            cacheMissesCounter.RawValue = 0;
            cacheHitRatioCounter = CreatePerformanceCounter("Cache Hit Ratio", formattedInstanceName);
            cacheHitRatioCounter.RawValue = 0;
            cacheAccessAttemptsCounter = CreatePerformanceCounter("Total # of Cache Access Attempts", formattedInstanceName);
            cacheAccessAttemptsCounter.RawValue = 0;

            cacheExpiriesCounter = CreatePerformanceCounter("Cache Expiries/sec", formattedInstanceName);
            cacheExpiriesCounter.RawValue = 0;

            cacheScavengedItemsCounter = CreatePerformanceCounter("Cache Scavenged Items/sec", formattedInstanceName);
            cacheScavengedItemsCounter.RawValue = 0;

            cacheTotalEntriesCounter = CreatePerformanceCounter("Total Cache Entries", formattedInstanceName);
            cacheTotalEntriesCounter.RawValue = 0;
            cacheUpdatedEntriesCounter = CreatePerformanceCounter("Updated Entries/sec", formattedInstanceName);
            cacheUpdatedEntriesCounter.RawValue = 0;

            totalCacheExpiriesCounter = CreatePerformanceCounter(CachingInstrumentationProvider.TotalCacheExpiriesCounterName, formattedInstanceName);
            totalCacheExpiriesCounter.RawValue = 0;
            totalCacheHitsCounter = CreatePerformanceCounter(CachingInstrumentationProvider.TotalCacheHitsCounterName, formattedInstanceName);
            totalCacheHitsCounter.RawValue = 0;
            totalCacheMissesCounter = CreatePerformanceCounter(CachingInstrumentationProvider.TotalCacheMissesCounterName, formattedInstanceName);
            totalCacheMissesCounter.RawValue = 0;
            totalCacheScavengedItemsCounter = CreatePerformanceCounter(CachingInstrumentationProvider.TotalCacheScavengedItemsCounterName, formattedInstanceName);
            totalCacheScavengedItemsCounter.RawValue = 0;
            totalUpdatedEntriesItemsCounter = CreatePerformanceCounter(CachingInstrumentationProvider.TotalUpdatedEntriesItemsCounterName, formattedInstanceName);
            totalUpdatedEntriesItemsCounter.RawValue = 0;
        }
 public void SetUp()
 {
     formatter = new NoPrefixNameFormatter();
 }