diff options
Diffstat (limited to 'tests/pipelinebenchmark.cpp')
-rw-r--r-- | tests/pipelinebenchmark.cpp | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/pipelinebenchmark.cpp b/tests/pipelinebenchmark.cpp index 0c0b9e6..16806c7 100644 --- a/tests/pipelinebenchmark.cpp +++ b/tests/pipelinebenchmark.cpp | |||
@@ -47,7 +47,7 @@ | |||
47 | 47 | ||
48 | // class IndexUpdater : public Sink::Preprocessor { | 48 | // class IndexUpdater : public Sink::Preprocessor { |
49 | // public: | 49 | // public: |
50 | // void newEntity(const QByteArray &uid, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &newEntity, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE | 50 | // void newEntity(const QByteArray &uid, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &newEntity, Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE |
51 | // { | 51 | // { |
52 | // for (int i = 0; i < 10; i++) { | 52 | // for (int i = 0; i < 10; i++) { |
53 | // Index ridIndex(QString("index.index%1").arg(i).toLatin1(), transaction); | 53 | // Index ridIndex(QString("index.index%1").arg(i).toLatin1(), transaction); |
@@ -56,11 +56,11 @@ | |||
56 | // } | 56 | // } |
57 | // | 57 | // |
58 | // void modifiedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, const Sink::ApplicationDomain::BufferAdaptor &newEntity, | 58 | // void modifiedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, const Sink::ApplicationDomain::BufferAdaptor &newEntity, |
59 | // Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE | 59 | // Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE |
60 | // { | 60 | // { |
61 | // } | 61 | // } |
62 | // | 62 | // |
63 | // void deletedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, Sink::Storage::Transaction &transaction) Q_DECL_OVERRIDE | 63 | // void deletedEntity(const QByteArray &key, qint64 revision, const Sink::ApplicationDomain::BufferAdaptor &oldEntity, Sink::Storage::DataStore::Transaction &transaction) Q_DECL_OVERRIDE |
64 | // { | 64 | // { |
65 | // } | 65 | // } |
66 | // }; | 66 | // }; |
@@ -83,9 +83,8 @@ class PipelineBenchmark : public QObject | |||
83 | { | 83 | { |
84 | TestResource::removeFromDisk(resourceIdentifier); | 84 | TestResource::removeFromDisk(resourceIdentifier); |
85 | 85 | ||
86 | auto pipeline = QSharedPointer<Sink::Pipeline>::create(resourceIdentifier); | 86 | auto pipeline = QSharedPointer<Sink::Pipeline>::create(Sink::ResourceContext{resourceIdentifier, "test"}); |
87 | pipeline->setPreprocessors("mail", preprocessors); | 87 | pipeline->setPreprocessors("mail", preprocessors); |
88 | pipeline->setResourceType("test"); | ||
89 | 88 | ||
90 | QTime time; | 89 | QTime time; |
91 | time.start(); | 90 | time.start(); |
@@ -112,7 +111,7 @@ class PipelineBenchmark : public QObject | |||
112 | // Print memory layout, RSS is what is in memory | 111 | // Print memory layout, RSS is what is in memory |
113 | // std::system("exec pmap -x \"$PPID\""); | 112 | // std::system("exec pmap -x \"$PPID\""); |
114 | // | 113 | // |
115 | std::cout << "Size: " << Sink::Storage(Sink::storageLocation(), resourceIdentifier, Sink::Storage::ReadOnly).diskUsage() / 1024 << " [kb]" << std::endl; | 114 | std::cout << "Size: " << Sink::Storage::DataStore(Sink::storageLocation(), resourceIdentifier, Sink::Storage::DataStore::ReadOnly).diskUsage() / 1024 << " [kb]" << std::endl; |
116 | std::cout << "Time: " << allProcessedTime << " [ms]" << std::endl; | 115 | std::cout << "Time: " << allProcessedTime << " [ms]" << std::endl; |
117 | 116 | ||
118 | HAWD::Dataset dataset("pipeline", mHawdState); | 117 | HAWD::Dataset dataset("pipeline", mHawdState); |