Debugger: Sanitize report of timings

Use Python's list and dict output directly, instead of
a manually stringified version thereof. Also, report
milliseconds instead of microseconds.

Change-Id: Ibcbdea732e7ecc58fd672bc5da794832215865b4
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
hjk
2016-11-10 22:16:48 +01:00
parent 5fb2dc6e47
commit ae4d3c52e6
2 changed files with 5 additions and 4 deletions

View File

@@ -399,7 +399,7 @@ class DumperBase:
def ping(self, key):
return
elapsed = int(1000000 * (time.time() - self.pretimings[key]))
elapsed = int(1000 * (time.time() - self.pretimings[key]))
self.timings.append([key, elapsed])
def childRange(self):

View File

@@ -725,11 +725,12 @@ class Dumper(DumperBase):
self.qtNamespaceToReport = None
self.output.append(',partial="%d"' % isPartial)
self.output.append(',counts=%s' % self.counts)
self.output.append(',timimgs=%s' % self.timings)
self.preping('safePrint')
tt = time.time()
safePrint(''.join(self.output))
self.ping('safePrint')
safePrint('"%s"' % str(self.dumpStats()))
print(',time="%d"' % int(1000 * (tt - time.time())))
def parseAndEvaluate(self, exp):
#warn('EVALUATE '%s'' % exp)