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:
Marcus Tillmanns
2023-05-12 11:13:03 +02:00
parent 161cac0a85
commit aca8e5906b
2 changed files with 4 additions and 0 deletions

View File

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

View File

@@ -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