in transcoder/Transcoder.py [0:0]
def print_summary(self):
"""Print summary of the messages that were processed"""
if logging.getLogger().isEnabledFor(logging.INFO):
end_time = datetime.now()
time_diff = end_time - self.start_time
total_seconds = time_diff.total_seconds()
if self.create_schemas_only is True:
logging.info('Run in create_schemas_only mode')
if self.output_manager.supports_data_writing() is False:
logging.info('Output manager \'%s\' does not support message writes',
self.output_manager.output_type_identifier())
if self.frame_only is False:
if self.message_parser.stats_only is True:
logging.info('Run in stats_only mode')
if self.sampling_count is not None:
logging.info('Sampled messages: %s', self.sampling_count)
if self.message_parser.message_type_inclusions is not None:
logging.info('Message type inclusions: %s', self.message_parser.message_type_inclusions)
elif self.message_parser.message_type_exclusions is not None:
logging.info('Message type exclusions: %s', self.message_parser.message_type_exclusions)
if self.create_schemas_only is False:
logging.info('Source message count: %s', self.source.record_count)
logging.info('Processed message count: %s', self.message_parser.record_count)
logging.info('Transcoded message count: %s', self.transcoded_count)
logging.info('Processed schema count: %s', self.message_parser.total_schema_count)
logging.info('Summary of message counts: %s', self.message_parser.record_type_count)
logging.info('Summary of error message counts: %s', self.message_parser.error_record_type_count)
logging.info('Message rate: %s per second', round(self.source.record_count / total_seconds, 6))
else:
logging.info('Source record count: %s', self.source.record_count)
logging.info('Total runtime in seconds: %s', round(total_seconds, 6))
logging.info('Total runtime in minutes: %s', round(total_seconds / 60, 6))