From 01adeefb24bf72f1015e93aa5f075f93f56d94da Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 30 Jul 2015 13:43:31 +0200 Subject: Made the pipeline an implementation detail of the resource. This removes one dependency from the Listener and will allow us to test the Listener better. --- tests/dummyresourcebenchmark.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'tests/dummyresourcebenchmark.cpp') diff --git a/tests/dummyresourcebenchmark.cpp b/tests/dummyresourcebenchmark.cpp index 7d40779..4c649a9 100644 --- a/tests/dummyresourcebenchmark.cpp +++ b/tests/dummyresourcebenchmark.cpp @@ -8,11 +8,13 @@ #include "commands.h" #include "entitybuffer.h" #include "synclistresult.h" +#include "pipeline.h" #include "event_generated.h" #include "entity_generated.h" #include "metadata_generated.h" #include "createentity_generated.h" + #include static void removeFromDisk(const QString &name) @@ -94,10 +96,9 @@ private Q_SLOTS: time.start(); int num = 10000; - Akonadi2::Pipeline pipeline("org.kde.dummy.instance1"); - QSignalSpy revisionSpy(&pipeline, SIGNAL(revisionUpdated())); - DummyResource resource("org.kde.dummy.instance1"); - resource.configurePipeline(&pipeline); + auto pipeline = QSharedPointer::create("org.kde.dummy.instance1"); + QSignalSpy revisionSpy(pipeline.data(), SIGNAL(revisionUpdated())); + DummyResource resource("org.kde.dummy.instance1", pipeline); flatbuffers::FlatBufferBuilder eventFbb; eventFbb.Clear(); @@ -133,7 +134,7 @@ private Q_SLOTS: const QByteArray command(reinterpret_cast(fbb.GetBufferPointer()), fbb.GetSize()); for (int i = 0; i < num; i++) { - resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline); + resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command); } auto appendTime = time.elapsed(); -- cgit v1.2.3