- print '\tAsleep: %s (%.2f%%)' % (asleep, asleep.float_seconds() * 100 / total)
- print '\tEncoding: %s (%.2f%%)' % (encoding, encoding.float_seconds() * 100 / total)
- print '\tSending: %s (%.2f%%)' % (sending, sending.float_seconds() * 100 / total)
- print '\tRemote encoding / receiving: %s (%.2f%%)' % (remote_encoding_and_receiving, remote_encoding_and_receiving.float_seconds() * 100 / total)
- print ''
+
+ print('\t%s: %2.f%% %fs' % ('Asleep'.ljust(16), asleep.float_seconds() * 100 / total, asleep.float_seconds()))
+
+ def print_with_fps(v, name, total, frames):
+ if v.float_seconds() > 1:
+ print('\t%s: %2.f%% %f %.2ffps' % (name.ljust(16), v.float_seconds() * 100 / total, v.float_seconds(), frames / v.float_seconds()))
+
+ print_with_fps(local_encoding, 'Local encoding', total, wakes)
+ if sending.float_seconds() > 0:
+ print('\t%s: %2.f%%' % ('Sending'.ljust(16), sending.float_seconds() * 100 / total))
+ print_with_fps(remote_encoding, 'Remote encoding', total, wakes)
+ if receiving.float_seconds() > 0:
+ print('\t%s: %2.f%%' % ('Receiving'.ljust(16), receiving.float_seconds() * 100 / total))
+ print('')