/// <summary> /// Analyzes events from the ETL file and aggregates events from the multiple sessions. /// </summary> /// <param name="etlFilePath">ETL file to be analyzed.</param> /// <param name="threshold">The filter value in milliseconds. Values greater then this will only be shown.</param> public void AnalyzeETLFile(string etlFilePath, int threshold = 0) { if (dynamicProfilerEventProcessor != null) { dynamicProfilerEventProcessor.Dispose(); dynamicProfilerEventProcessor = null; } using (ProfilerEventEtlFileProcessor profilerEventEtlFileProcessor = new ProfilerEventEtlFileProcessor(etlFilePath, threshold)) { profilerEventEtlFileProcessor.ProcessEtlFile(); callTree = profilerEventEtlFileProcessor.FlattenCallTree().GetEnumerator(); maxRelativeTimeStamp = profilerEventEtlFileProcessor.MaxRelativeTimeStamp(); } }
/// <summary> /// Starts ETW profiling. /// </summary> /// <param name="sessionId">The session unique identifier.</param> /// <param name="threshold">The filter value in milliseconds. Values greater then this will only be shown.</param> public void Start(int sessionId, int threshold = 0) { dynamicProfilerEventProcessor = new DynamicProfilerEventProcessor(sessionId, threshold); dynamicProfilerEventProcessor.Start(); }