From af7208a65e5668a91fa5d631bcbf766737eca827 Mon Sep 17 00:00:00 2001 From: Peter Barker Date: Sat, 20 Aug 2022 19:11:35 +1000 Subject: [PATCH] autotest: cast packet count to floast before determining rate Could be causing rate to be zero on autotest server --- Tools/autotest/common.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tools/autotest/common.py b/Tools/autotest/common.py index 3381920c02..837b8b7997 100644 --- a/Tools/autotest/common.py +++ b/Tools/autotest/common.py @@ -4218,8 +4218,8 @@ class AutoTest(ABC): for (t, want_rate) in message_rates.items(): if t not in counts: raise NotAchievedException("Wanted %s but got none" % t) - self.progress("Got (%u)" % counts[t]) - got_rate = counts[t] / delta_time_us * 1000000 + self.progress("Got (%u) in (%uus)" % (counts[t], delta_time_us)) + got_rate = float(counts[t]) / delta_time_us * 1000000 if abs(want_rate - got_rate) > 5: raise NotAchievedException("Not getting %s data at wanted rate want=%f got=%f" %