System\ServiceModel\Diagnostics\PerformanceCounters.cs (105)
44return PerformanceCounters.scope;
48PerformanceCounters.scope = value;
56return (PerformanceCounters.scope != PerformanceCounterScope.Off) &&
57(PerformanceCounters.scope != PerformanceCounterScope.Default);
65return (PerformanceCounters.scope == PerformanceCounterScope.Default);
80PerformanceCounters.scope = scope;
85PerformanceCounters.scope = PerformanceCounterScope.Off;
99PerformanceCounters.scope = PerformanceCounterScope.Off;
113return PerformanceCounters.GetPerformanceCounter(
122return PerformanceCounters.GetPerformanceCounter(
131return PerformanceCounters.GetPerformanceCounter(
140return PerformanceCounters.GetPerformanceCounter(
150if (PerformanceCounters.PerformanceCountersEnabled || PerformanceCounters.MinimalPerformanceCountersEnabled)
152counter = PerformanceCounters.GetPerformanceCounterInternal(categoryName, perfCounterName, instanceName, instanceLifetime);
188PerformanceCounters.scope = PerformanceCounterScope.Off;
281if (PerformanceCounters.performanceCounters == null)
283lock (PerformanceCounters.perfCounterDictionarySyncObject)
285if (PerformanceCounters.performanceCounters == null)
287PerformanceCounters.performanceCounters = new Dictionary<string, ServiceModelPerformanceCounters>();
291return PerformanceCounters.performanceCounters;
299if (PerformanceCounters.performanceCountersList == null)
301lock (PerformanceCounters.perfCounterDictionarySyncObject)
303if (PerformanceCounters.performanceCountersList == null)
305PerformanceCounters.performanceCountersList = new List<ServiceModelPerformanceCounters>();
309return PerformanceCounters.performanceCountersList;
317if (PerformanceCounters.performanceCountersBaseUri == null)
319lock (PerformanceCounters.perfCounterDictionarySyncObject)
321if (PerformanceCounters.performanceCountersBaseUri == null)
323PerformanceCounters.performanceCountersBaseUri = new Dictionary<string, ServiceModelPerformanceCountersEntry>();
327return PerformanceCounters.performanceCountersBaseUri;
341bool performanceCountersEnabled = PerformanceCounters.PerformanceCountersEnabled;
342bool minimalPerformanceCountersEnabled = PerformanceCounters.MinimalPerformanceCountersEnabled;
349lock (PerformanceCounters.perfCounterDictionarySyncObject)
351if (!PerformanceCounters.PerformanceCountersForEndpoint.TryGetValue(endpointDispatcher.PerfCounterId, out counters))
356PerformanceCounters.PerformanceCountersForEndpoint.Add(endpointDispatcher.PerfCounterId, counters);
358int index = PerformanceCounters.PerformanceCountersForEndpointList.FindIndex(c => c == null);
361PerformanceCounters.PerformanceCountersForEndpointList[index] = counters;
365PerformanceCounters.PerformanceCountersForEndpointList.Add(counters);
366index = PerformanceCounters.PerformanceCountersForEndpointList.Count - 1;
378lock (PerformanceCounters.perfCounterDictionarySyncObject)
380if (!PerformanceCounters.PerformanceCountersForBaseUri.TryGetValue(endpointDispatcher.PerfCounterBaseId, out countersEntry))
390PerformanceCounters.PerformanceCountersForBaseUri.Add(endpointDispatcher.PerfCounterBaseId, countersEntry);
400if (PerformanceCounters.PerformanceCountersEnabled)
402lock (PerformanceCounters.perfCounterDictionarySyncObject)
407if (PerformanceCounters.PerformanceCountersForEndpoint.TryGetValue(id, out counters))
409PerformanceCounters.PerformanceCountersForEndpoint.Remove(id);
410int index = PerformanceCounters.PerformanceCountersForEndpointList.IndexOf(counters);
411PerformanceCounters.PerformanceCountersForEndpointList[index] = null;
416PerformanceCounters.PerformanceCountersForBaseUri.Remove(baseId);
446ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
452if (PerformanceCounters.Scope == PerformanceCounterScope.All)
454OperationPerformanceCountersBase oCounters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operation);
460EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
471if (PerformanceCounters.PerformanceCountersEnabled)
475ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
486if (PerformanceCounters.PerformanceCountersEnabled)
490ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
502if (PerformanceCounters.PerformanceCountersEnabled)
506ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
521if (PerformanceCounters.Scope == PerformanceCounterScope.All)
524OperationPerformanceCountersBase opCounters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
529EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
535ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
545PerformanceCounters.MethodReturnedSuccess(operationName, -1);
553if (PerformanceCounters.Scope == PerformanceCounterScope.All)
556OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
565EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
575ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
589PerformanceCounters.MethodReturnedFault(operationName, -1);
597if (PerformanceCounters.Scope == PerformanceCounterScope.All)
600OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
609EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
619ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
633PerformanceCounters.MethodReturnedError(operationName, -1);
641if (PerformanceCounters.Scope == PerformanceCounterScope.All)
644OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
653EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
663ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
691ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
695PerformanceCounters.InvokeMethod(counters.ServicePerformanceCounters, methodName);
697if (PerformanceCounters.Scope == PerformanceCounterScope.All)
704PerformanceCounters.InvokeMethod(sCounters.EndpointPerformanceCounters, methodName);
712PerformanceCounters.InvokeMethod(oCounters, methodName);
723PerformanceCounters.CallOnAllCounters("AuthenticationFailed", message, listenUri, true);
732if (PerformanceCounters.Scope == PerformanceCounterScope.All)
734OperationPerformanceCountersBase counters = PerformanceCounters.GetOperationPerformanceCounters(el.PerfCounterInstanceId, operationName);
740EndpointPerformanceCountersBase eCounters = PerformanceCounters.GetEndpointPerformanceCounters(el.PerfCounterInstanceId);
747ServicePerformanceCountersBase sCounters = PerformanceCounters.GetServicePerformanceCounters(el.PerfCounterInstanceId);
757ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
761if (PerformanceCounters.Scope == PerformanceCounterScope.All)
777ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
781if (PerformanceCounters.Scope == PerformanceCounterScope.All)
797if (PerformanceCounters.Scope == PerformanceCounterScope.All)
799ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
809if (PerformanceCounters.Scope == PerformanceCounterScope.All)
811ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
821if (PerformanceCounters.Scope == PerformanceCounterScope.All)
823ServiceModelPerformanceCountersEntry counters = PerformanceCounters.GetServiceModelPerformanceCountersBaseUri(uri);
845if (PerformanceCounters.PerformanceCountersForEndpointList.Count == 0)
849return PerformanceCounters.PerformanceCountersForEndpointList[perfCounterInstanceId];
857PerformanceCounters.PerformanceCountersForBaseUri.TryGetValue(uri, out counters);
864ServiceModelPerformanceCounters counters = PerformanceCounters.GetServiceModelPerformanceCounters(perfCounterInstanceId);
874ServiceModelPerformanceCounters counters = PerformanceCounters.GetServiceModelPerformanceCounters(perfCounterInstanceId);
884ServiceModelPerformanceCounters counters = PerformanceCounters.GetServiceModelPerformanceCounters(perfCounterInstanceId);