Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions tools/sof_perf_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ def skip_to_first_trace(trace_item_gen: TraceItemGenerator):
# The first trace must have a timestamp with integral part equals to 0.
if int(item.timestamp) == 0:
return item
return next(trace_item_gen)

def make_trace_item(fileio: TextIO) -> TraceItemGenerator:
'''Filter and parse a line of trace in string form into TraceItem object, for example:
Expand Down Expand Up @@ -263,10 +264,10 @@ def print_perf_info():
print(stats)

if args.out2csv is not None:
stats.to_csv(args.out2csv, sep=',', float_format='%.3f', index=False)
stats.to_csv(args.out2csv, sep=',', float_format='{:.3f}'.format, index=False)

if args.out2html is not None:
stats.to_html(args.out2html, float_format='%.3f', index=False)
stats.to_html(args.out2html, float_format='{:.3f}'.format, index=False)

def parse_args():
'''Parse command line arguments'''
Expand Down