When parsing the trace files the last profiling step is not loaded
Juntao-Wang opened this issue ยท 2 comments
๐ Describe the bug
When parsing the trace files, the last profiling step is not loaded. This is related to this line
cpu_kernels = cpu_kernels[cpu_kernels["ts"] < last_profiler_start]
Steps to reproduce
Call analyzer = TraceAnalysis(trace_dir=trace_dir)
to load the trace files and notice that the last profiling step is missing in analyzer.t.traces[0]
Expected behavior
The last profiling step should also be loaded and analyzed.
Environment
Linux x86_64
Additional Info
No response
Hi Juntao, thank you for reporting the issue. I think it was intentional that the last profiler step is not included because of some traces events in the last profiler step might be cut-off during the trace collection process.
To include the last profiler step, you may introduce an optional argument like include_last_profiler_step
into the TraceAnalysis to allow users to switch on and off based on their needs.
Hi Juntao, thank you for reporting the issue. I think it was intentional that the last profiler step is not included because of some traces events in the last profiler step might be cut-off during the trace collection process.
To include the last profiler step, you may introduce an optional argument like
include_last_profiler_step
into the TraceAnalysis to allow users to switch on and off based on their needs.
Thanks for the explanations and suggestions! The optional argument include_last_profiler_step
is added.