Debugger: Add profiling output for objectTreeFetched()

Change-Id: I9407b7617c6e74ab71a72360a72b5f6d1e334ee7
Reviewed-by: Kai Koehne <kai.koehne@nokia.com>
This commit is contained in:
Kai Koehne
2012-05-15 16:39:11 +02:00
parent 4f6cda3ba0
commit 383b9e00ad

View File

@@ -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";
}
}