From 23ebed25b79f4b6edf630546d7d9d571398a1640 Mon Sep 17 00:00:00 2001 From: Kitsune Ral Date: Sun, 4 Nov 2018 19:55:20 +0900 Subject: Profiler logging fixes and improvements --- lib/jobs/syncjob.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'lib/jobs') diff --git a/lib/jobs/syncjob.cpp b/lib/jobs/syncjob.cpp index 9cbac71b..6baf388e 100644 --- a/lib/jobs/syncjob.cpp +++ b/lib/jobs/syncjob.cpp @@ -109,11 +109,12 @@ BaseJob::Status SyncData::parseJson(const QJsonDocument &data) totalEvents += r.state.size() + r.ephemeral.size() + r.accountData.size() + r.timeline.size(); } - totalRooms += roomData.size(); + totalRooms += rs.size(); } - qCDebug(PROFILER) << "*** SyncData::parseJson(): batch with" - << totalRooms << "room(s)," - << totalEvents << "event(s) in" << et; + if (totalRooms > 9 || et.nsecsElapsed() >= profilerMinNsecs()) + qCDebug(PROFILER) << "*** SyncData::parseJson(): batch with" + << totalRooms << "room(s)," + << totalEvents << "event(s) in" << et; return BaseJob::Success; } -- cgit v1.2.3