internal static void MethodReturnedSuccess(string operationName, long time) { EndpointDispatcher el = GetEndpointDispatcher(); if (null != el) { if (PerformanceCounters.Scope == PerformanceCounterScope.All) { string uri = el.PerfCounterId; OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName); if (null != counters) { counters.MethodReturnedSuccess(); if (time > 0) { counters.SaveCallDuration(time); } } EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId); if (null != eCounters) { eCounters.MethodReturnedSuccess(); if (time > 0) { eCounters.SaveCallDuration(time); } } } ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId); if (null != sCounters) { sCounters.MethodReturnedSuccess(); if (time > 0) { sCounters.SaveCallDuration(time); } } } }
internal static void MethodReturnedSuccess(string operationName, long time) { EndpointDispatcher endpointDispatcher = GetEndpointDispatcher(); if (endpointDispatcher != null) { if (Scope == PerformanceCounterScope.All) { string perfCounterId = endpointDispatcher.PerfCounterId; OperationPerformanceCountersBase operationPerformanceCounters = GetOperationPerformanceCounters(endpointDispatcher.PerfCounterInstanceId, operationName); if (operationPerformanceCounters != null) { operationPerformanceCounters.MethodReturnedSuccess(); if (time > 0L) { operationPerformanceCounters.SaveCallDuration(time); } } EndpointPerformanceCountersBase endpointPerformanceCounters = GetEndpointPerformanceCounters(endpointDispatcher.PerfCounterInstanceId); if (endpointPerformanceCounters != null) { endpointPerformanceCounters.MethodReturnedSuccess(); if (time > 0L) { endpointPerformanceCounters.SaveCallDuration(time); } } } ServicePerformanceCountersBase servicePerformanceCounters = GetServicePerformanceCounters(endpointDispatcher.PerfCounterInstanceId); if (servicePerformanceCounters != null) { servicePerformanceCounters.MethodReturnedSuccess(); if (time > 0L) { servicePerformanceCounters.SaveCallDuration(time); } } } }