forked from qt-creator/qt-creator
AutoTest: Output time taken when parsing tests
Makes debugging easier as you don't have to calculate end - start yourself. Change-Id: Ib75a36bbf52633e188a6c4bbd488eb439cb52984 Reviewed-by: Christian Stenger <christian.stenger@qt.io>
This commit is contained in:
@@ -334,6 +334,7 @@ void TestCodeParser::scanForTests(const QSet<FilePath> &filePaths,
|
||||
// use only a single parser or all current active?
|
||||
const QList<ITestParser *> codeParsers = parsers.isEmpty() ? m_testCodeParsers : parsers;
|
||||
qCDebug(LOG) << QDateTime::currentDateTime().toString("hh:mm:ss.zzz") << "StartParsing";
|
||||
m_parsingTimer.restart();
|
||||
QSet<QString> extensions;
|
||||
const auto cppSnapshot = CppEditor::CppModelManager::instance()->snapshot();
|
||||
|
||||
@@ -438,6 +439,7 @@ void TestCodeParser::onFinished(bool success)
|
||||
m_updateParsers.clear();
|
||||
emit parsingFinished();
|
||||
qCDebug(LOG) << QDateTime::currentDateTime().toString("hh:mm:ss.zzz") << "ParsingFin";
|
||||
qCDebug(LOG) << "Parsing took:" << m_parsingTimer.elapsed() << "ms";
|
||||
}
|
||||
m_dirty = false;
|
||||
break;
|
||||
|
@@ -97,6 +97,8 @@ private:
|
||||
Utils::FutureSynchronizer m_futureSynchronizer;
|
||||
std::unique_ptr<Tasking::TaskTree> m_taskTree;
|
||||
QHash<Utils::FilePath, int> m_qmlEditorRev;
|
||||
|
||||
QElapsedTimer m_parsingTimer;
|
||||
};
|
||||
|
||||
} // namespace Internal
|
||||
|
Reference in New Issue
Block a user