Tools: autotest: give message rate in drain

This commit is contained in:
Peter Barker 2018-12-17 09:55:48 +11:00 committed by Andrew Tridgell
parent 622549456c
commit 22cc55a500

View File

@ -352,9 +352,12 @@ class AutoTest(ABC):
def drain_mav(self):
count = 0
tstart = time.time()
while self.mav.recv_match(type='SYSTEM_TIME', blocking=False) is not None:
count += 1
self.progress("Drained %u messages from mav" % count)
tdelta = time.time() - tstart
self.progress("Drained %u messages from mav (%f/s)" % (
count, count/float(tdelta)))
#################################################
# SIM UTILITIES