internal static TaskPerformanceData[] StopLatencyDetection(LatencyDetectionContext latencyDetectionContext) { TaskPerformanceData[] result = null; if (latencyDetectionContext != null) { result = latencyDetectionContext.StopAndFinalizeCollection(); } return(result); }
internal static TaskPerformanceData[] StopLatencyDetection(LatencyDetectionContext latencyDetectionContext) { if (latencyDetectionContext == null) { return(null); } TaskPerformanceData[] result = latencyDetectionContext.StopAndFinalizeCollection(); if (latencyDetectionContext.Elapsed.TotalSeconds > (double)ProvisioningPerformanceHelper.threshold) { object[] array = new object[3]; string text = latencyDetectionContext.ToString("s"); if (text.Length > 32766) { text = text.Substring(0, 32766); } array[0] = ProvisioningPerformanceHelper.threshold; array[1] = text; array[2] = Environment.CurrentManagedThreadId; TaskLogger.LogEvent("All", ProvisioningPerformanceHelper.endTuple, array); } return(result); }