From 06f7341fa040d0620b5e09f2322ebeb68e58ec43 Mon Sep 17 00:00:00 2001
From: Nascher <kevin@nascher.org>
Date: Mon, 8 Aug 2016 15:32:28 +0200
Subject: [PATCH] Benchmark Log::validHtml on Linux
---
src/mumble/Log.cpp | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/src/mumble/Log.cpp b/src/mumble/Log.cpp
index 18e7236..d1a267e 100644
--- a/src/mumble/Log.cpp
+++ b/src/mumble/Log.cpp
@@ -483,7 +483,18 @@ void Log::log(MsgType mt, const QString &console, const QString &terse, bool own
tc.insertBlock();
}
tc.insertHtml(Log::msgColor(QString::fromLatin1("[%1] ").arg(Qt::escape(dt.time().toString())), Log::Time));
+ QElapsedTimer timer;
+ timer.start();
validHtml(console, true, &tc);
+ qDebug() << "[Debug] validHtml took " << timer.elapsed() << "ms";
+
+ // Show Memory Usage
+ QProcess ps;
+ ps.start(tr("sh"), QStringList() << tr("-c") << tr("ps u `pidof mumble`"));
+ ps.waitForFinished();
+ while (ps.canReadLine()) {
+ qDebug() << ps.readLine();
+ }
tc.movePosition(QTextCursor::End);
g.mw->qteLog->setTextCursor(tc);
--
2.9.2