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; }
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); }