Cdbbridge: report dumptime of fetchVariables

Change-Id: I866fd5dbf547a4d6ec1ab9806080419735131d19
Reviewed-by: hjk <hjk@qt.io>
This commit is contained in:
David Schulz
2024-05-28 11:14:43 +02:00
parent 81aed65406
commit 5c23ab8c2d

View File

@@ -7,6 +7,7 @@ import sys
import cdbext import cdbext
import re import re
import threading import threading
import time
from utils import TypeCode from utils import TypeCode
sys.path.insert(1, os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe())))) sys.path.insert(1, os.path.dirname(os.path.abspath(inspect.getfile(inspect.currentframe()))))
@@ -443,6 +444,7 @@ class Dumper(DumperBase):
self.put('{name="%s",value="",type="",numchild="0"},' % msg) self.put('{name="%s",value="",type="",numchild="0"},' % msg)
def fetchVariables(self, args): def fetchVariables(self, args):
start_time = time.perf_counter()
self.resetStats() self.resetStats()
(ok, res) = self.tryFetchInterpreterVariables(args) (ok, res) = self.tryFetchInterpreterVariables(args)
if ok: if ok:
@@ -476,6 +478,8 @@ class Dumper(DumperBase):
self.put(',qtnamespace="%s"' % self.qtNamespaceToReport) self.put(',qtnamespace="%s"' % self.qtNamespaceToReport)
self.qtNamespaceToReport = None self.qtNamespaceToReport = None
runtime = time.perf_counter() - start_time
self.put(',runtime="%s"' % runtime)
self.reportResult(''.join(self.output), args) self.reportResult(''.join(self.output), args)
self.output = [] self.output = []