forked from qt-creator/qt-creator
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:
@@ -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)
|
||||
|
Reference in New Issue
Block a user