[DEBUG ONLY] Bug 1143380 - print how long does it take to launch emulator draft
authorEdgar Chen <echen@mozilla.com>
Tue, 22 Dec 2015 10:25:05 +0800
changeset 321210 fde272850e15e9ff9dc7ee24cdabbdc36b5b4f3b
parent 321209 fa362bc3f5f3b29a1baee373df9a014b63b72534
child 321211 ce9041cf4c64cc355ad1bb7bdedc31142f367f49
push id9350
push userechen@mozilla.com
push dateWed, 13 Jan 2016 07:31:33 +0000
bugs1143380
milestone46.0a1
[DEBUG ONLY] Bug 1143380 - print how long does it take to launch emulator
testing/mozbase/mozrunner/mozrunner/devices/emulator.py
--- a/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
+++ b/testing/mozbase/mozrunner/mozrunner/devices/emulator.py
@@ -117,16 +117,18 @@ class Emulator(Device):
         now = datetime.datetime.now()
         while (devices - original_devices) == set([]):
             time.sleep(1)
             # Sometimes it takes more than 60s to launch emulator, so we
             # increase timeout value to 180s. Please see bug 1143380.
             if datetime.datetime.now() - now > datetime.timedelta(seconds=180):
                 raise TimeoutException('timed out waiting for emulator to start')
             devices = set(self._get_online_devices())
+        delta = datetime.datetime.now() - now
+        print 'Edgar: launching emulator takes %s ....' % delta
         devices = devices - original_devices
         self.serial = devices.pop()
         self.connect()
 
     def _get_online_devices(self):
         return set([d[0] for d in self.dm.devices() if d[1] != 'offline' if d[0].startswith('emulator')])
 
     def connect(self):