summaryrefslogtreecommitdiffstats
path: root/tests/storagebenchmark.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/storagebenchmark.cpp')
-rw-r--r--tests/storagebenchmark.cpp8
1 files changed, 1 insertions, 7 deletions
diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp
index fba72ad..ce1005d 100644
--- a/tests/storagebenchmark.cpp
+++ b/tests/storagebenchmark.cpp
@@ -97,14 +97,8 @@ private Q_SLOTS:
97 auto event = createEvent(); 97 auto event = createEvent();
98 if (store) { 98 if (store) {
99 auto transaction = store->createTransaction(Akonadi2::Storage::ReadWrite); 99 auto transaction = store->createTransaction(Akonadi2::Storage::ReadWrite);
100 transaction.setAutocommit(10000);
100 for (int i = 0; i < count; i++) { 101 for (int i = 0; i < count; i++) {
101 if (i % 10000 == 0) {
102 if (i > 0) {
103 transaction.commit();
104 transaction = std::move(store->createTransaction(Akonadi2::Storage::ReadWrite));
105 }
106 }
107
108 transaction.write(keyPrefix + QByteArray::number(i), event); 102 transaction.write(keyPrefix + QByteArray::number(i), event);
109 } 103 }
110 transaction.commit(); 104 transaction.commit();