Skip to content

Commit

Permalink
sof_perf_analyzer: fix incomplete pandas table printing
Browse files Browse the repository at this point in the history
By default, pandas will only show part of the table in printing
if the table have a row number greater than display.max_rows,
or a column number greater than display.max_columns,

This patch makes sure the whole pandas table is printed
by setting display.max_rows and display.max_columns to
None in printing context.

Fixes: thesofproject#1117

Signed-off-by: Chao Song <[email protected]>
  • Loading branch information
Chao Song committed Oct 23, 2023
1 parent 27afc5e commit f295132
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion tools/sof_perf_analyzer.py
Original file line number Diff line number Diff line change
Expand Up @@ -240,7 +240,9 @@ def print_perf_info():
'''Output SOF performance info'''
stats = perf_stats.rename_axis('COMP_ID').reset_index()
# pylint: disable=C0209
with pd.option_context('display.float_format', '{:0.3f}'.format):
with pd.option_context('display.float_format', '{:0.3f}'.format,
'display.max_rows', None,
'display.max_columns', None):
print(stats)

if args.out2csv is not None:
Expand Down

0 comments on commit f295132

Please sign in to comment.