diff options
author | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-12 15:43:22 +0100 |
---|---|---|
committer | Christian Mollekopf <chrigi_1@fastmail.fm> | 2016-02-12 15:43:22 +0100 |
commit | 09c195628bd58c9ba55a540a195a52c1f169e91f (patch) | |
tree | 4e31dd51c93c64757bddc54846f9889c8acbac98 | |
parent | 640d097fdb1c34bc77f2e592fe44fb58c4f8d1ef (diff) | |
download | sink-09c195628bd58c9ba55a540a195a52c1f169e91f.tar.gz sink-09c195628bd58c9ba55a540a195a52c1f169e91f.zip |
Different summaries in the benchmark and fixed printing.
The transaction commit invalidates the transaction
-rw-r--r-- | tests/databasepopulationandfacadequerybenchmark.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/tests/databasepopulationandfacadequerybenchmark.cpp b/tests/databasepopulationandfacadequerybenchmark.cpp index 7df38ba..6a2b616 100644 --- a/tests/databasepopulationandfacadequerybenchmark.cpp +++ b/tests/databasepopulationandfacadequerybenchmark.cpp | |||
@@ -53,7 +53,7 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject | |||
53 | for (int i = 0; i < count; i++) { | 53 | for (int i = 0; i < count; i++) { |
54 | auto domainObject = Sink::ApplicationDomain::Event::Ptr::create(); | 54 | auto domainObject = Sink::ApplicationDomain::Event::Ptr::create(); |
55 | domainObject->setProperty("uid", "uid"); | 55 | domainObject->setProperty("uid", "uid"); |
56 | domainObject->setProperty("summary", "summary"); | 56 | domainObject->setProperty("summary", QString("summary%1").arg(i)); |
57 | domainObject->setProperty("attachment", attachment); | 57 | domainObject->setProperty("attachment", attachment); |
58 | flatbuffers::FlatBufferBuilder fbb; | 58 | flatbuffers::FlatBufferBuilder fbb; |
59 | domainTypeAdaptorFactory->createBuffer(*domainObject, fbb); | 59 | domainTypeAdaptorFactory->createBuffer(*domainObject, fbb); |
@@ -65,6 +65,9 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject | |||
65 | } | 65 | } |
66 | transaction.commit(); | 66 | transaction.commit(); |
67 | 67 | ||
68 | transaction = storage.createTransaction(Sink::Storage::ReadOnly); | ||
69 | db = Sink::Storage::mainDatabase(transaction, "event"); | ||
70 | |||
68 | auto dataSizeTotal = count * (QByteArray("uid").size() + QByteArray("summary").size() + attachment.size()); | 71 | auto dataSizeTotal = count * (QByteArray("uid").size() + QByteArray("summary").size() + attachment.size()); |
69 | auto size = db.getSize(); | 72 | auto size = db.getSize(); |
70 | auto onDisk = storage.diskUsage(); | 73 | auto onDisk = storage.diskUsage(); |