summaryrefslogtreecommitdiffstats
path: root/tests/pipelinebenchmark.cpp
diff options
context:
space:
mode:
authorChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-28 00:24:53 +0200
committerChristian Mollekopf <chrigi_1@fastmail.fm>2016-05-28 00:24:53 +0200
commite9c75177590d8546ebd9425f16c4269a9c92f517 (patch)
tree8a953631e467d9df50657e22bd90954b7b71c990 /tests/pipelinebenchmark.cpp
parent8f01eb530262d1442fc4fa0782a41e052412d43b (diff)
downloadsink-e9c75177590d8546ebd9425f16c4269a9c92f517.tar.gz
sink-e9c75177590d8546ebd9425f16c4269a9c92f517.zip
Refactored the generic resource to use separate classes for
changereplay and synchronization. This cleans up the API and avoids the excessive passing around of transactions. It also provides more flexibility in eventually using different synchronization strategies for different resources.
Diffstat (limited to 'tests/pipelinebenchmark.cpp')
-rw-r--r--tests/pipelinebenchmark.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/pipelinebenchmark.cpp b/tests/pipelinebenchmark.cpp
index 0133a6c..51481fd 100644
--- a/tests/pipelinebenchmark.cpp
+++ b/tests/pipelinebenchmark.cpp
@@ -33,6 +33,7 @@
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> 35#include <common/indexupdater.h>
36#include <common/adaptorfactoryregistry.h>
36 37
37#include "hawd/dataset.h" 38#include "hawd/dataset.h"
38#include "hawd/formatter.h" 39#include "hawd/formatter.h"
@@ -83,10 +84,8 @@ class PipelineBenchmark : public QObject
83 TestResource::removeFromDisk(resourceIdentifier); 84 TestResource::removeFromDisk(resourceIdentifier);
84 85
85 auto pipeline = QSharedPointer<Sink::Pipeline>::create(resourceIdentifier); 86 auto pipeline = QSharedPointer<Sink::Pipeline>::create(resourceIdentifier);
86
87 auto mailFactory = QSharedPointer<TestMailAdaptorFactory>::create();
88 pipeline->setPreprocessors("mail", preprocessors); 87 pipeline->setPreprocessors("mail", preprocessors);
89 pipeline->setAdaptorFactory("mail", mailFactory); 88 pipeline->setResourceType("test");
90 89
91 QTime time; 90 QTime time;
92 time.start(); 91 time.start();
@@ -131,6 +130,7 @@ private slots:
131 void init() 130 void init()
132 { 131 {
133 Sink::Log::setDebugOutputLevel(Sink::Log::Warning); 132 Sink::Log::setDebugOutputLevel(Sink::Log::Warning);
133 Sink::AdaptorFactoryRegistry::instance().registerFactory<Sink::ApplicationDomain::Mail, TestMailAdaptorFactory>("test");
134 resourceIdentifier = "org.kde.test.instance1"; 134 resourceIdentifier = "org.kde.test.instance1";
135 } 135 }
136 136