@@ -69,21 +69,32 @@ def stop(self):
69
69
return False
70
70
71
71
def factoryReset (self ):
72
+ reset_start = time .monotonic ()
72
73
logging .error ("FACTORY RESET: %s" % self .command )
73
74
logging .error ("self.killed: %s" % self .killed )
75
+ stop_start = time .monotonic ()
74
76
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 ))
76
79
77
80
for kvs in self .kvsPathSet :
78
81
if os .path .exists (kvs ):
79
- logging . error ( "UNLINKING: %s" % kvs )
82
+ unlink_start = time . monotonic ( )
80
83
os .unlink (kvs )
84
+ unlink_end = time .monotonic ()
85
+ logging .error ("UNLINKING: %s, took %s" % (kvs , unlink_start - unlink_end ))
81
86
82
87
if wasRunning :
88
+ start_start = time .monotonic ()
83
89
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 ))
85
94
return started
86
95
96
+ reset_end = time .monotonic ()
97
+ logging .error ("RESET DONE, took %s" % (reset_end - reset_start ))
87
98
return True
88
99
89
100
def waitForAnyAdvertisement (self ):
0 commit comments