forked from qt-creator/qt-creator
Debugger: Add profiling output for objectTreeFetched()
Change-Id: I9407b7617c6e74ab71a72360a72b5f6d1e334ee7 Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
@@ -41,6 +41,7 @@
|
||||
#include <qmldebug/qmldebugconstants.h>
|
||||
#include <utils/qtcassert.h>
|
||||
#include <utils/savedaction.h>
|
||||
#include <QElapsedTimer>
|
||||
|
||||
using namespace QmlDebug;
|
||||
|
||||
@@ -580,10 +581,20 @@ void QmlInspectorAgent::objectTreeFetched(const ObjectReference &object)
|
||||
foreach (const ObjectReference &obj, m_rootObjects)
|
||||
watchData.append(buildWatchData(obj, WatchData()));
|
||||
|
||||
QElapsedTimer t;
|
||||
if (debug) {
|
||||
t.start();
|
||||
qDebug() << "inserting " << watchData.size()
|
||||
<< "entries into watch handler ...";
|
||||
}
|
||||
|
||||
WatchHandler *watchHandler = m_engine->watchHandler();
|
||||
watchHandler->beginCycle(InspectWatch, true);
|
||||
watchHandler->insertBulkData(watchData);
|
||||
watchHandler->endCycle(InspectWatch);
|
||||
|
||||
if (debug)
|
||||
qDebug() << "inserting entries took" << t.elapsed() << "ms";
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user