summaryrefslogtreecommitdiffstats
path: root/tests/pipelinebenchmark.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-19 15:28:42 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-10-21 09:18:49 +0200
commitba7c8b890c45d735216888204ec88882ef58c918 (patch)
treecb00c9b51e5353ba3726216679c81c0e2fe9ac35 /tests/pipelinebenchmark.cpp
parentda1c86b80f230c3a2023f97c0048020a12e38de4 (diff)
downloadsink-ba7c8b890c45d735216888204ec88882ef58c918.tar.gz
sink-ba7c8b890c45d735216888204ec88882ef58c918.zip
Ported the pipeline to the entitystore
Diffstat (limited to 'tests/pipelinebenchmark.cpp')
-rw-r--r--tests/pipelinebenchmark.cpp30
1 files changed, 1 insertions, 29 deletions
diff --git a/tests/pipelinebenchmark.cpp b/tests/pipelinebenchmark.cpp
index 16806c7..2e614ef 100644
--- a/tests/pipelinebenchmark.cpp
+++ b/tests/pipelinebenchmark.cpp
@@ -32,7 +32,6 @@
32#include <common/store.h> 32#include <common/store.h>
33#include <common/pipeline.h> 33#include <common/pipeline.h>
34#include <common/index.h> 34#include <common/index.h>
35#include <common/indexupdater.h>
36#include <common/adaptorfactoryregistry.h> 35#include <common/adaptorfactoryregistry.h>
37 36
38#include "hawd/dataset.h" 37#include "hawd/dataset.h"
@@ -45,27 +44,6 @@
45#include "createentity_generated.h" 44#include "createentity_generated.h"
46#include "getrssusage.h" 45#include "getrssusage.h"
47 46
48// class IndexUpdater : public Sink::Preprocessor {
49// public:
50// void newEntity(const QByteArray &uid, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &newEntity, Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE
51// {
52// for (int i = 0; i < 10; i++) {
53// Index ridIndex(QString("index.index%1").arg(i).toLatin1(), transaction);
54// ridIndex.add("foo", uid);
55// }
56// }
57//
58// void modifiedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, const Sink::ApplicationDomain::BufferAdaptor &newEntity,
59// Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE
60// {
61// }
62//
63// void deletedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE
64// {
65// }
66// };
67//
68
69/** 47/**
70 * Benchmark pipeline processing speed. 48 * Benchmark pipeline processing speed.
71 * 49 *
@@ -133,15 +111,9 @@ private slots:
133 resourceIdentifier = "sink.test.instance1"; 111 resourceIdentifier = "sink.test.instance1";
134 } 112 }
135 113
136 void testWithoutIndex()
137 {
138 populateDatabase(10000, QVector<Sink::Preprocessor *>());
139 }
140
141 void testWithIndex() 114 void testWithIndex()
142 { 115 {
143 auto indexer = QSharedPointer<DefaultIndexUpdater<Sink::ApplicationDomain::Mail>>::create(); 116 populateDatabase(10000, QVector<Sink::Preprocessor *>());
144 populateDatabase(10000, QVector<Sink::Preprocessor *>() << indexer.data());
145 } 117 }
146}; 118};
147 119