summaryrefslogtreecommitdiffstats
path: root/tests/mailquerybenchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/mailquerybenchmark.cpp')
-rw-r--r--tests/mailquerybenchmark.cpp10
1 files changed, 6 insertions, 4 deletions
diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp
index 022d21d..3ecfa19 100644
--- a/tests/mailquerybenchmark.cpp
+++ b/tests/mailquerybenchmark.cpp
@@ -69,7 +69,7 @@ class MailQueryBenchmark : public QObject
69 if (folderSpreadFactor == 0) { 69 if (folderSpreadFactor == 0) {
70 domainObject.setFolder("folder1"); 70 domainObject.setFolder("folder1");
71 } else { 71 } else {
72 domainObject.setFolder(QByteArray("folder") + QByteArray::number(i % folderSpreadFactor)); 72 domainObject.setFolder(QByteArray("folder") + QByteArray::number(i - (i % folderSpreadFactor)));
73 } 73 }
74 74
75 entityStore.add("mail", domainObject, false, [] (const Mail &) {}); 75 entityStore.add("mail", domainObject, false, [] (const Mail &) {});
@@ -172,9 +172,11 @@ private slots:
172 query.reduce<ApplicationDomain::Mail::Folder>(Query::Reduce::Selector::max<ApplicationDomain::Mail::Date>()); 172 query.reduce<ApplicationDomain::Mail::Folder>(Query::Reduce::Selector::max<ApplicationDomain::Mail::Date>());
173 query.limit(1000); 173 query.limit(1000);
174 174
175 int mailsPerFolder = 100; 175 int mailsPerFolder = 10;
176 populateDatabase(50000, mailsPerFolder); 176
177 testLoad(query, 50000, mailsPerFolder); 177 int count = 50000;
178 populateDatabase(count, mailsPerFolder);
179 testLoad(query, count, query.limit());
178 } 180 }
179}; 181};
180 182