Skip to content

Commit 3909701

Browse files
More debugging
1 parent dece224 commit 3909701

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

scripts/tests/chiptest/test_definition.py

+14-3
Original file line numberDiff line numberDiff line change
@@ -69,21 +69,32 @@ def stop(self):
6969
return False
7070

7171
def factoryReset(self):
72+
reset_start = time.monotonic()
7273
logging.error("FACTORY RESET: %s" % self.command)
7374
logging.error("self.killed: %s" % self.killed)
75+
stop_start = time.monotonic()
7476
wasRunning = (not self.killed) and self.stop()
75-
logging.error("wasRunning: %s" % wasRunning)
77+
stop_end = time.monotonic()
78+
logging.error("wasRunning: %s, took %s to stop" % (wasRunning, stop_end - stop_start))
7679

7780
for kvs in self.kvsPathSet:
7881
if os.path.exists(kvs):
79-
logging.error("UNLINKING: %s" % kvs)
82+
unlink_start = time.monotonic()
8083
os.unlink(kvs)
84+
unlink_end = time.monotonic()
85+
logging.error("UNLINKING: %s, took %s" % (kvs, unlink_start - unlink_end))
8186

8287
if wasRunning:
88+
start_start = time.monotonic()
8389
started = self.start()
84-
logging.error("STARTED: %s" % started)
90+
start_end = time.monotonic()
91+
logging.error("STARTED: %s in %s" % (started, start_end - start_start))
92+
reset_end = time.monotonic()
93+
logging.error("RESET DONE, took %s" % (reset_end - reset_start))
8594
return started
8695

96+
reset_end = time.monotonic()
97+
logging.error("RESET DONE, took %s" % (reset_end - reset_start))
8798
return True
8899

89100
def waitForAnyAdvertisement(self):

0 commit comments

Comments
 (0)