Skip to content

Commit

Permalink
Include message type in p1_print summary table, and sort by type.
Browse files Browse the repository at this point in the history
  • Loading branch information
adamshapiro0 committed Sep 22, 2023
1 parent 2bfc17f commit e5dcabe
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions python/bin/p1_print
Original file line number Diff line number Diff line change
Expand Up @@ -255,12 +255,12 @@ other types of data.
_logger.info('Selected data size: %d B' % bytes_decoded)
_logger.info('')

format_string = '| {:<50} | {:>8} |'
_logger.info(format_string.format('Message Type', 'Count'))
_logger.info(format_string.format('-' * 50, '-' * 8))
for type, info in message_stats.items():
_logger.info(format_string.format(message_type_to_class[type].__name__, info['count']))
_logger.info(format_string.format('-' * 50, '-' * 8))
_logger.info(format_string.format('Total', total_messages))
format_string = '| {:<50} | {:>5} | {:>8} |'
_logger.info(format_string.format('Message Name', 'Type', 'Count'))
_logger.info(format_string.format('-' * 50, '-' * 5, '-' * 8))
for type, info in sorted(message_stats.items(), key=lambda x: int(x[0])):
_logger.info(format_string.format(message_type_to_class[type].__name__, int(type), info['count']))
_logger.info(format_string.format('-' * 50, '-' * 5, '-' * 8))
_logger.info(format_string.format('Total', '', total_messages))
elif total_messages == 0:
_logger.warning('No valid FusionEngine messages found.')

0 comments on commit e5dcabe

Please sign in to comment.