diff options
author | Eike Ziller <eike.ziller@qt.io> | 2018-09-28 10:25:34 +0200 |
---|---|---|
committer | Eike Ziller <eike.ziller@qt.io> | 2018-10-01 08:13:57 +0000 |
commit | e2e9707510ae653fe40597b9f954eae11ec52201 (patch) | |
tree | 7fa1144ba640cddefc261386e862eb48cbb06e12 /src/libs/extensionsystem | |
parent | 18a6265f1374d1389629530d664d7a1593af14e1 (diff) | |
download | qt-creator-e2e9707510ae653fe40597b9f954eae11ec52201.tar.gz |
Fix plugin loading profiling report
We print a report both before and after a plugin's initialization method
is called, but only the time spent till after the method call should be
counted.
This makes a different for the delayedInitialize cycle: Before
delayedInitialize is called of a plugin, there can be a delay after the
previous one. But this delay should not be counted as part of the
initialization time of the plugin.
Change-Id: I4e5fb53cd83cb36a45a599cfc3f1f8539f6327f9
Reviewed-by: Christian Stenger <christian.stenger@qt.io>
Diffstat (limited to 'src/libs/extensionsystem')
-rw-r--r-- | src/libs/extensionsystem/pluginmanager.cpp | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libs/extensionsystem/pluginmanager.cpp b/src/libs/extensionsystem/pluginmanager.cpp index 665b89f886..b6ee6afa11 100644 --- a/src/libs/extensionsystem/pluginmanager.cpp +++ b/src/libs/extensionsystem/pluginmanager.cpp @@ -1526,15 +1526,15 @@ void PluginManagerPrivate::profilingReport(const char *what, const PluginSpec *s const int elapsedMS = absoluteElapsedMS - m_profileElapsedMS; m_profileElapsedMS = absoluteElapsedMS; if (spec) - m_profileTotal[spec] += elapsedMS; - if (spec) qDebug("%-22s %-22s %8dms (%8dms)", what, qPrintable(spec->name()), absoluteElapsedMS, elapsedMS); else qDebug("%-45s %8dms (%8dms)", what, absoluteElapsedMS, elapsedMS); if (what && *what == '<') { QString tc; - if (spec) + if (spec) { + m_profileTotal[spec] += elapsedMS; tc = spec->name() + '_'; + } tc += QString::fromUtf8(QByteArray(what + 1)); Utils::Benchmarker::report("loadPlugins", tc, elapsedMS); } |