summaryrefslogtreecommitdiffstats
path: root/tests/mailquerybenchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mailquerybenchmark.cpp')
-rw-r--r--tests/mailquerybenchmark.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp
index ca1e026..402f31f 100644
--- a/tests/mailquerybenchmark.cpp
+++ b/tests/mailquerybenchmark.cpp
@@ -219,11 +219,14 @@ private slots:
219 219
220 populateDatabase(count, 10, false, count); 220 populateDatabase(count, 10, false, count);
221 time.restart(); 221 time.restart();
222 context.mResourceAccess->revisionChanged(2000); 222 for (int i = 0; i <= 10; i++) {
223 //Simulate revision updates in steps of 100
224 context.mResourceAccess->revisionChanged(1000 + i * 100);
225 }
223 //We should have 200 items in total in the end. 2000 mails / 10 folders => 200 reduced mails 226 //We should have 200 items in total in the end. 2000 mails / 10 folders => 200 reduced mails
224 QTRY_COMPARE(added.count(), 200); 227 QTRY_COMPARE(added.count(), 200);
225 //For every email we have to redo the reduction and increase the count, which is a modification. 228 //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.
226 QTRY_COMPARE(modified.count(), 900); 229 QTRY_COMPARE(modified.count(), 100);
227 std::cout << "Incremental query took " << time.elapsed() << std::endl; 230 std::cout << "Incremental query took " << time.elapsed() << std::endl;
228 std::cout << "added " << added.count() << std::endl; 231 std::cout << "added " << added.count() << std::endl;
229 std::cout << "modified " << modified.count() << std::endl; 232 std::cout << "modified " << modified.count() << std::endl;