diff options
author | Aaron Seigo <aseigo@kde.org> | 2014-12-14 13:31:40 +0100 |
---|---|---|
committer | Aaron Seigo <aseigo@kde.org> | 2014-12-14 20:44:25 +0100 |
commit | 3e01511e54bda77e553f22ff905c557ac204cbe5 (patch) | |
tree | f1bd04733b40d65b5690ca6c7d91025a3459c4a5 /tests/storagebenchmark.cpp | |
parent | 447f24cb93e05f40c3ebf94daf47c7e518ab15d9 (diff) | |
download | sink-3e01511e54bda77e553f22ff905c557ac204cbe5.tar.gz sink-3e01511e54bda77e553f22ff905c557ac204cbe5.zip |
restore the test to its former glory
Diffstat (limited to 'tests/storagebenchmark.cpp')
-rw-r--r-- | tests/storagebenchmark.cpp | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index 33898d3..130753f 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp | |||
@@ -93,11 +93,16 @@ private Q_SLOTS: | |||
93 | 93 | ||
94 | time.start(); | 94 | time.start(); |
95 | { | 95 | { |
96 | auto event = std::string(500, '1');//createEvent(); | 96 | auto event = createEvent(); |
97 | |||
98 | if (store) store->startTransaction(); | ||
99 | for (int i = 0; i < count; i++) { | 97 | for (int i = 0; i < count; i++) { |
100 | if (store) { | 98 | if (store) { |
99 | if (i % 10000 == 0) { | ||
100 | if (i > 0) { | ||
101 | store->commitTransaction(); | ||
102 | } | ||
103 | store->startTransaction(); | ||
104 | } | ||
105 | |||
101 | store->write(keyPrefix + std::to_string(i), event); | 106 | store->write(keyPrefix + std::to_string(i), event); |
102 | } else { | 107 | } else { |
103 | myfile << event; | 108 | myfile << event; |