def METHOD_NAME(self):
    metrics = self.producer.metrics()
    if self.raw_metrics:
        pprint.pprint(metrics)
    else:
        print('{record-send-rate} records/sec ({byte-rate} B/sec),'
              ' {request-latency-avg} latency,'
              ' {record-size-avg} record size,'
              ' {batch-size-avg} batch size,'
              ' {records-per-request-avg} records/req'
              .format(**metrics['producer-metrics']))