Commit ae4d3c52 authored by hjk's avatar hjk

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: default avatarhjk <hjk@qt.io>
parent 5fb2dc6e
......@@ -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):
......
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment