/// <summary> /// Clears the current profiling session & step id. /// </summary> public void Clear() { // clear callcontext container _callContextProfilingSessionContainer.Clear(); // clear current session CurrentSession = null; // clear step id CurrentSessionStepId = null; }
/// <summary> /// Clears the current profiling session & step id. /// </summary> public void Clear() { // clear web container _webProfilingSessionContainer.Clear(); // clear current session CurrentSession = null; // clear step id CurrentSessionStepId = null; }
/// <summary> /// Stops the current profiling session. /// </summary> /// <param name="discardResults"> /// When true, discards the profiling results of the entire profiling session. /// </param> public static void Stop(bool discardResults = false) { var profilingSession = Current; if (profilingSession != null) { try { if (CircularBuffer != null) { CircularBuffer.Add(profilingSession.Profiler.GetTimingSession()); } profilingSession._profiler.Stop(discardResults); } catch (Exception ex) { HandleExceptionHandler(ex, typeof(ProfilingSession)); } } // Clear the current profiling session on stopping _profilingSessionContainer.Clear(); }