From 39097019744bfaec3a4feb4c5e5d715603f93dc2 Mon Sep 17 00:00:00 2001 From: Boris Zbarsky <bzbarsky@apple.com> Date: Mon, 23 Sep 2024 16:22:46 -0400 Subject: [PATCH] More debugging --- scripts/tests/chiptest/test_definition.py | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/tests/chiptest/test_definition.py b/scripts/tests/chiptest/test_definition.py index 8b622cc194bbff..304454d600ea1d 100644 --- a/scripts/tests/chiptest/test_definition.py +++ b/scripts/tests/chiptest/test_definition.py @@ -69,21 +69,32 @@ def stop(self): return False def factoryReset(self): + reset_start = time.monotonic() logging.error("FACTORY RESET: %s" % self.command) logging.error("self.killed: %s" % self.killed) + stop_start = time.monotonic() wasRunning = (not self.killed) and self.stop() - logging.error("wasRunning: %s" % wasRunning) + stop_end = time.monotonic() + logging.error("wasRunning: %s, took %s to stop" % (wasRunning, stop_end - stop_start)) for kvs in self.kvsPathSet: if os.path.exists(kvs): - logging.error("UNLINKING: %s" % kvs) + unlink_start = time.monotonic() os.unlink(kvs) + unlink_end = time.monotonic() + logging.error("UNLINKING: %s, took %s" % (kvs, unlink_start - unlink_end)) if wasRunning: + start_start = time.monotonic() started = self.start() - logging.error("STARTED: %s" % started) + start_end = time.monotonic() + logging.error("STARTED: %s in %s" % (started, start_end - start_start)) + reset_end = time.monotonic() + logging.error("RESET DONE, took %s" % (reset_end - reset_start)) return started + reset_end = time.monotonic() + logging.error("RESET DONE, took %s" % (reset_end - reset_start)) return True def waitForAnyAdvertisement(self):