diff options
Diffstat (limited to 'tests/mailquerybenchmark.cpp')
-rw-r--r-- | tests/mailquerybenchmark.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp index ff61e81..4d67dca 100644 --- a/tests/mailquerybenchmark.cpp +++ b/tests/mailquerybenchmark.cpp | |||
@@ -103,7 +103,7 @@ class MailQueryBenchmark : public QObject | |||
103 | bool done = false; | 103 | bool done = false; |
104 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail, bool) { done = true; }); | 104 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail, bool) { done = true; }); |
105 | emitter->fetch(Mail::Ptr()); | 105 | emitter->fetch(Mail::Ptr()); |
106 | QUICK_TRY_VERIFY(!done); | 106 | QUICK_TRY_VERIFY(done); |
107 | Q_ASSERT(list.size() == expectedSize); | 107 | Q_ASSERT(list.size() == expectedSize); |
108 | 108 | ||
109 | const auto elapsed = time.elapsed(); | 109 | const auto elapsed = time.elapsed(); |
@@ -217,7 +217,7 @@ private slots: | |||
217 | bool done = false; | 217 | bool done = false; |
218 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail, bool) { done = true; }); | 218 | emitter->onInitialResultSetComplete([&done](const Mail::Ptr &mail, bool) { done = true; }); |
219 | emitter->fetch(Mail::Ptr()); | 219 | emitter->fetch(Mail::Ptr()); |
220 | QUICK_TRY_VERIFY(!done); | 220 | QUICK_TRY_VERIFY(done); |
221 | QCOMPARE(added.size(), expectedSize); | 221 | QCOMPARE(added.size(), expectedSize); |
222 | 222 | ||
223 | auto initialQueryTime = time.elapsed(); | 223 | auto initialQueryTime = time.elapsed(); |
@@ -230,9 +230,9 @@ private slots: | |||
230 | context.mResourceAccess->revisionChanged(1000 + i * 100); | 230 | context.mResourceAccess->revisionChanged(1000 + i * 100); |
231 | } | 231 | } |
232 | //We should have 200 items in total in the end. 2000 mails / 10 folders => 200 reduced mails | 232 | //We should have 200 items in total in the end. 2000 mails / 10 folders => 200 reduced mails |
233 | QUICK_TRY_VERIFY(added.count() != 200); | 233 | QUICK_TRY_VERIFY(added.count() == 200); |
234 | //We get one modification per thread from the first 100 (1000 mails / 10 folders), everything else is optimized away because we ignore repeated updates to the same thread. | 234 | //We get one modification per thread from the first 100 (1000 mails / 10 folders), everything else is optimized away because we ignore repeated updates to the same thread. |
235 | QUICK_TRY_VERIFY(modified.count() != 100); | 235 | QUICK_TRY_VERIFY(modified.count() == 100); |
236 | auto incrementalQueryTime = time.elapsed(); | 236 | auto incrementalQueryTime = time.elapsed(); |
237 | std::cout << "Incremental query took " << incrementalQueryTime << std::endl; | 237 | std::cout << "Incremental query took " << incrementalQueryTime << std::endl; |
238 | std::cout << "added " << added.count() << std::endl; | 238 | std::cout << "added " << added.count() << std::endl; |