mirror of
https://github.com/romanz/amodem.git
synced 2026-04-01 08:46:49 +08:00
add last logging for total throughput
This commit is contained in:
7
recv.py
7
recv.py
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user