add last logging for total throughput

This commit is contained in:
Roman Zeyde
2014-07-21 14:21:52 +03:00
parent 26f2f2bb03
commit cbc9ae1c99

View File

@@ -221,6 +221,7 @@ def decode(bits_iterator):
def main(fname):
log.info('Running MODEM @ {:.1f} kbps'.format(sigproc.modem_bps / 1e3))
start = time.time()
fd = sys.stdin if (fname == '-') else open(fname, 'rb')
signal = stream.iread(fd)
@@ -239,10 +240,12 @@ def main(fname):
duration = time.time() - stats['rx_start']
audio_time = stats['rx_bits'] / float(sigproc.modem_bps)
log.info('Demodulated %.3f kB @ %.3f seconds = %.1f%% realtime',
log.info('Demodulated %.3f kB @ %.3f seconds (%.1f%% realtime)',
stats['rx_bits'] / 8e3, duration, 100 * duration / audio_time)
log.info('Decoded %.3f kB', size / 1e3)
duration = time.time() - start
log.info('Received %.3f kB @ %.3f seconds = %.3f kB/s',
size * 1e-3, duration, size * 1e-3 / duration)
if pylab:
pylab.figure()