From 3e01511e54bda77e553f22ff905c557ac204cbe5 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Sun, 14 Dec 2014 13:31:40 +0100 Subject: restore the test to its former glory --- tests/storagebenchmark.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'tests') 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: time.start(); { - auto event = std::string(500, '1');//createEvent(); - - if (store) store->startTransaction(); + auto event = createEvent(); for (int i = 0; i < count; i++) { if (store) { + if (i % 10000 == 0) { + if (i > 0) { + store->commitTransaction(); + } + store->startTransaction(); + } + store->write(keyPrefix + std::to_string(i), event); } else { myfile << event; -- cgit v1.2.3