示例#1
0
        static ServicePerformanceCountersBase GetServicePerformanceCounters(int perfCounterInstanceId)
        {
            ServiceModelPerformanceCounters counters = PerformanceCounters.GetServiceModelPerformanceCounters(perfCounterInstanceId);

            if (counters != null)
            {
                return(counters.ServicePerformanceCounters);
            }
            return(null);
        }
示例#2
0
        static OperationPerformanceCountersBase GetOperationPerformanceCounters(int perfCounterInstanceId, string operation)
        {
            ServiceModelPerformanceCounters counters = PerformanceCounters.GetServiceModelPerformanceCounters(perfCounterInstanceId);

            if (counters != null)
            {
                return(counters.GetOperationPerformanceCounters(operation));
            }
            return(null);
        }