diff options
Diffstat (limited to 'tests/dummyresourcebenchmark.cpp')
-rw-r--r-- | tests/dummyresourcebenchmark.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
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 @@ | |||
8 | #include "commands.h" | 8 | #include "commands.h" |
9 | #include "entitybuffer.h" | 9 | #include "entitybuffer.h" |
10 | #include "synclistresult.h" | 10 | #include "synclistresult.h" |
11 | #include "pipeline.h" | ||
11 | 12 | ||
12 | #include "event_generated.h" | 13 | #include "event_generated.h" |
13 | #include "entity_generated.h" | 14 | #include "entity_generated.h" |
14 | #include "metadata_generated.h" | 15 | #include "metadata_generated.h" |
15 | #include "createentity_generated.h" | 16 | #include "createentity_generated.h" |
17 | |||
16 | #include <iostream> | 18 | #include <iostream> |
17 | 19 | ||
18 | static void removeFromDisk(const QString &name) | 20 | static void removeFromDisk(const QString &name) |
@@ -94,10 +96,9 @@ private Q_SLOTS: | |||
94 | time.start(); | 96 | time.start(); |
95 | int num = 10000; | 97 | int num = 10000; |
96 | 98 | ||
97 | Akonadi2::Pipeline pipeline("org.kde.dummy.instance1"); | 99 | auto pipeline = QSharedPointer<Akonadi2::Pipeline>::create("org.kde.dummy.instance1"); |
98 | QSignalSpy revisionSpy(&pipeline, SIGNAL(revisionUpdated())); | 100 | QSignalSpy revisionSpy(pipeline.data(), SIGNAL(revisionUpdated())); |
99 | DummyResource resource("org.kde.dummy.instance1"); | 101 | DummyResource resource("org.kde.dummy.instance1", pipeline); |
100 | resource.configurePipeline(&pipeline); | ||
101 | 102 | ||
102 | flatbuffers::FlatBufferBuilder eventFbb; | 103 | flatbuffers::FlatBufferBuilder eventFbb; |
103 | eventFbb.Clear(); | 104 | eventFbb.Clear(); |
@@ -133,7 +134,7 @@ private Q_SLOTS: | |||
133 | const QByteArray command(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize()); | 134 | const QByteArray command(reinterpret_cast<const char *>(fbb.GetBufferPointer()), fbb.GetSize()); |
134 | 135 | ||
135 | for (int i = 0; i < num; i++) { | 136 | for (int i = 0; i < num; i++) { |
136 | resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command, &pipeline); | 137 | resource.processCommand(Akonadi2::Commands::CreateEntityCommand, command); |
137 | } | 138 | } |
138 | auto appendTime = time.elapsed(); | 139 | auto appendTime = time.elapsed(); |
139 | 140 | ||