From 5e50b1f1fd9505cc2b7b72d47a7d8fe2e114dc78 Mon Sep 17 00:00:00 2001 From: Klaas Freitag Date: Tue, 8 Oct 2013 14:07:46 +0200 Subject: [PATCH] Add some progress meassuring logging. --- src/mirall/progressdispatcher.cpp | 6 ++++++ src/mirall/progressdispatcher.h | 3 +++ 2 files changed, 9 insertions(+) diff --git a/src/mirall/progressdispatcher.cpp b/src/mirall/progressdispatcher.cpp index d1d66190b6..3d2b365e12 100644 --- a/src/mirall/progressdispatcher.cpp +++ b/src/mirall/progressdispatcher.cpp @@ -171,11 +171,17 @@ void ProgressDispatcher::setProgressInfo(const QString& folder, const Progress:: } else { if( newProgress.kind == Progress::StartSync ) { _recentProblems.clear(); + _timer.start(); } if( newProgress.kind == Progress::EndSync ) { newProgress.overall_current_bytes = newProgress.overall_transmission_size; newProgress.current_file_no = newProgress.overall_file_count; _currentAction.remove(newProgress.folder); + int64_t msecs = _timer.elapsed(); + + qDebug()<< "[PROGRESS] progressed " << newProgress.overall_transmission_size + << " bytes in " << newProgress.overall_file_count << " files" + << " in msec " << msecs; } if( newProgress.kind == Progress::EndDownload || newProgress.kind == Progress::EndUpload || diff --git a/src/mirall/progressdispatcher.h b/src/mirall/progressdispatcher.h index 96a2f1fe58..4f62fac48f 100644 --- a/src/mirall/progressdispatcher.h +++ b/src/mirall/progressdispatcher.h @@ -18,6 +18,7 @@ #include #include #include +#include namespace Mirall { @@ -116,6 +117,8 @@ private: QList _recentProblems; QHash _currentAction; + + QElapsedTimer _timer; static ProgressDispatcher* _instance; };