Example #1
0
		public CounterSetInstance CreateInstance(Uri instanceName)
		{
			TraceHelper.Current.DebugMessage(string.Concat("Counter instance Url = ", instanceName.ToString()));
			string str = instanceName.ToString().Replace("/", "_");
			CounterSetInstance counterSetInstance = this.counterSet.CreateCounterSetInstance(str);
			this.ActiveRequests = new PerfCounter(counterSetInstance, 1);
			this.ActiveRunspaces = new PerfCounter(counterSetInstance, 2);
			this.ActiveUsers = new PerfCounter(counterSetInstance, 3);
			this.UserQuotaViolationsPerSec = new PerfCounter(counterSetInstance, 4);
			this.SystemQuotaViolationsPerSec = new PerfCounter(counterSetInstance, 5);
			return counterSetInstance;
		}
Example #2
0
        public CounterSetInstance CreateInstance(Uri instanceName)
        {
            TraceHelper.Current.DebugMessage(string.Concat("Counter instance Url = ", instanceName.ToString()));
            string             str = instanceName.ToString().Replace("/", "_");
            CounterSetInstance counterSetInstance = this.counterSet.CreateCounterSetInstance(str);

            this.ActiveRequests              = new PerfCounter(counterSetInstance, 1);
            this.ActiveRunspaces             = new PerfCounter(counterSetInstance, 2);
            this.ActiveUsers                 = new PerfCounter(counterSetInstance, 3);
            this.UserQuotaViolationsPerSec   = new PerfCounter(counterSetInstance, 4);
            this.SystemQuotaViolationsPerSec = new PerfCounter(counterSetInstance, 5);
            return(counterSetInstance);
        }