diff options
Diffstat (limited to 'tests/storagebenchmark.cpp')
-rw-r--r-- | tests/storagebenchmark.cpp | 15 |
1 files changed, 12 insertions, 3 deletions
diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index bfdd2ce..c1d4dc8 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp | |||
@@ -2,6 +2,9 @@ | |||
2 | 2 | ||
3 | #include "calendar_generated.h" | 3 | #include "calendar_generated.h" |
4 | 4 | ||
5 | #include "hawd/dataset.h" | ||
6 | #include "common/storage.h" | ||
7 | |||
5 | #include <iostream> | 8 | #include <iostream> |
6 | #include <fstream> | 9 | #include <fstream> |
7 | 10 | ||
@@ -9,8 +12,6 @@ | |||
9 | #include <QString> | 12 | #include <QString> |
10 | #include <QTime> | 13 | #include <QTime> |
11 | 14 | ||
12 | #include "common/storage.h" | ||
13 | |||
14 | using namespace Calendar; | 15 | using namespace Calendar; |
15 | using namespace flatbuffers; | 16 | using namespace flatbuffers; |
16 | 17 | ||
@@ -171,6 +172,10 @@ private Q_SLOTS: | |||
171 | 172 | ||
172 | void testBufferCreation() | 173 | void testBufferCreation() |
173 | { | 174 | { |
175 | HAWD::State state; | ||
176 | HAWD::Dataset dataset("buffer_creation", state); | ||
177 | HAWD::Dataset::Row row = dataset.row(); | ||
178 | |||
174 | QTime time; | 179 | QTime time; |
175 | time.start(); | 180 | time.start(); |
176 | 181 | ||
@@ -180,7 +185,11 @@ private Q_SLOTS: | |||
180 | 185 | ||
181 | qreal bufferDuration = time.restart(); | 186 | qreal bufferDuration = time.restart(); |
182 | qreal opsPerMs = count / bufferDuration; | 187 | qreal opsPerMs = count / bufferDuration; |
183 | qDebug() << "Creating buffers took[ms]: " << bufferDuration << "->" << opsPerMs << "ops/ms";; | 188 | row.setValue("numBuffers", count); |
189 | row.setValue("time", bufferDuration); | ||
190 | row.setValue("ops", opsPerMs); | ||
191 | dataset.insertRow(row); | ||
192 | qDebug() << "Creating buffers took[ms]: " << bufferDuration << "->" << opsPerMs << "ops/ms"; | ||
184 | } | 193 | } |
185 | 194 | ||
186 | void testSizes() | 195 | void testSizes() |