diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 18:44:31 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-08 18:44:31 +0100 |
commit | 65be895825a61ae463d09604634b064570febdc2 (patch) | |
tree | 790ceda8e9372405a0473a0534128ad24198b1fb /common/genericresource.cpp | |
parent | b8200434209c317ebc4883b9f87513991bae33e3 (diff) | |
download | sink-65be895825a61ae463d09604634b064570febdc2.tar.gz sink-65be895825a61ae463d09604634b064570febdc2.zip |
Trace some timings.
Diffstat (limited to 'common/genericresource.cpp')
-rw-r--r-- | common/genericresource.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/common/genericresource.cpp b/common/genericresource.cpp index b49ca94..ffb323d 100644 --- a/common/genericresource.cpp +++ b/common/genericresource.cpp | |||
@@ -17,6 +17,7 @@ | |||
17 | 17 | ||
18 | #include <QUuid> | 18 | #include <QUuid> |
19 | #include <QDataStream> | 19 | #include <QDataStream> |
20 | #include <QTime> | ||
20 | 21 | ||
21 | static int sBatchSize = 100; | 22 | static int sBatchSize = 100; |
22 | 23 | ||
@@ -273,9 +274,12 @@ private slots: | |||
273 | return KAsync::dowhile( | 274 | return KAsync::dowhile( |
274 | [it]() { return it->hasNext(); }, | 275 | [it]() { return it->hasNext(); }, |
275 | [it, this](KAsync::Future<void> &future) { | 276 | [it, this](KAsync::Future<void> &future) { |
277 | auto time = QSharedPointer<QTime>::create(); | ||
278 | time->start(); | ||
279 | |||
276 | auto queue = it->next(); | 280 | auto queue = it->next(); |
277 | processQueue(queue).then<void>([&future]() { | 281 | processQueue(queue).then<void>([&future, time]() { |
278 | Trace() << "Queue processed"; | 282 | Trace() << "Queue processed." << Log::TraceTime(time->elapsed()); |
279 | future.setFinished(); | 283 | future.setFinished(); |
280 | }).exec(); | 284 | }).exec(); |
281 | } | 285 | } |