diff options
Diffstat (limited to 'tests/dummyresourcewritebenchmark.cpp')
-rw-r--r-- | tests/dummyresourcewritebenchmark.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/tests/dummyresourcewritebenchmark.cpp b/tests/dummyresourcewritebenchmark.cpp index b4ab438..5cd7007 100644 --- a/tests/dummyresourcewritebenchmark.cpp +++ b/tests/dummyresourcewritebenchmark.cpp | |||
@@ -103,14 +103,14 @@ class DummyResourceWriteBenchmark : public QObject | |||
103 | 103 | ||
104 | void writeInProcess(int num) | 104 | void writeInProcess(int num) |
105 | { | 105 | { |
106 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | 106 | DummyResource::removeFromDisk("sink.dummy.instance1"); |
107 | 107 | ||
108 | 108 | ||
109 | QTime time; | 109 | QTime time; |
110 | time.start(); | 110 | time.start(); |
111 | 111 | ||
112 | auto pipeline = QSharedPointer<Sink::Pipeline>::create("org.kde.dummy.instance1"); | 112 | auto pipeline = QSharedPointer<Sink::Pipeline>::create("sink.dummy.instance1"); |
113 | DummyResource resource("org.kde.dummy.instance1", pipeline); | 113 | DummyResource resource("sink.dummy.instance1", pipeline); |
114 | 114 | ||
115 | int bufferSize = 0; | 115 | int bufferSize = 0; |
116 | auto command = createEntityBuffer(bufferSize); | 116 | auto command = createEntityBuffer(bufferSize); |
@@ -131,7 +131,7 @@ class DummyResourceWriteBenchmark : public QObject | |||
131 | const auto finalRss = getCurrentRSS(); | 131 | const auto finalRss = getCurrentRSS(); |
132 | const auto rssGrowth = finalRss - startingRss; | 132 | const auto rssGrowth = finalRss - startingRss; |
133 | // Since the database is memory mapped it is attributted to the resident set size. | 133 | // Since the database is memory mapped it is attributted to the resident set size. |
134 | const auto rssWithoutDb = finalRss - DummyResource::diskUsage("org.kde.dummy.instance1"); | 134 | const auto rssWithoutDb = finalRss - DummyResource::diskUsage("sink.dummy.instance1"); |
135 | const auto peakRss = getPeakRSS(); | 135 | const auto peakRss = getPeakRSS(); |
136 | // How much peak deviates from final rss in percent | 136 | // How much peak deviates from final rss in percent |
137 | const auto percentageRssError = static_cast<double>(peakRss - finalRss) * 100.0 / static_cast<double>(finalRss); | 137 | const auto percentageRssError = static_cast<double>(peakRss - finalRss) * 100.0 / static_cast<double>(finalRss); |
@@ -143,7 +143,7 @@ class DummyResourceWriteBenchmark : public QObject | |||
143 | std::cout << "Rss without db [kb]: " << rssWithoutDb / 1024 << std::endl; | 143 | std::cout << "Rss without db [kb]: " << rssWithoutDb / 1024 << std::endl; |
144 | std::cout << "Percentage peak rss error: " << percentageRssError << std::endl; | 144 | std::cout << "Percentage peak rss error: " << percentageRssError << std::endl; |
145 | 145 | ||
146 | auto onDisk = DummyResource::diskUsage("org.kde.dummy.instance1"); | 146 | auto onDisk = DummyResource::diskUsage("sink.dummy.instance1"); |
147 | auto writeAmplification = static_cast<double>(onDisk) / static_cast<double>(bufferSizeTotal); | 147 | auto writeAmplification = static_cast<double>(onDisk) / static_cast<double>(bufferSizeTotal); |
148 | std::cout << "On disk [kb]: " << onDisk / 1024 << std::endl; | 148 | std::cout << "On disk [kb]: " << onDisk / 1024 << std::endl; |
149 | std::cout << "Buffer size total [kb]: " << bufferSizeTotal / 1024 << std::endl; | 149 | std::cout << "Buffer size total [kb]: " << bufferSizeTotal / 1024 << std::endl; |
@@ -216,13 +216,13 @@ private slots: | |||
216 | 216 | ||
217 | void getFreePages() | 217 | void getFreePages() |
218 | { | 218 | { |
219 | std::system(QString("mdb_stat %1/%2 -ff").arg(Sink::storageLocation()).arg("org.kde.dummy.instance1").toLatin1().constData()); | 219 | std::system(QString("mdb_stat %1/%2 -ff").arg(Sink::storageLocation()).arg("sink.dummy.instance1").toLatin1().constData()); |
220 | } | 220 | } |
221 | 221 | ||
222 | // This allows to run individual parts without doing a cleanup, but still cleaning up normally | 222 | // This allows to run individual parts without doing a cleanup, but still cleaning up normally |
223 | void testCleanupForCompleteTest() | 223 | void testCleanupForCompleteTest() |
224 | { | 224 | { |
225 | DummyResource::removeFromDisk("org.kde.dummy.instance1"); | 225 | DummyResource::removeFromDisk("sink.dummy.instance1"); |
226 | } | 226 | } |
227 | 227 | ||
228 | private: | 228 | private: |