summaryrefslogtreecommitdiffstats
path: root/tests/storagebenchmark.cpp
diff options
context:
space:
mode:
authorAaron Seigo <aseigo@kde.org>2014-12-09 22:02:41 +0100
committerAaron Seigo <aseigo@kde.org>2014-12-11 01:01:13 +0100
commit42c41283304ec8ed75b020ecbec88f30bc198354 (patch)
tree9b546be85ead057239e8699e2d3a479eac7b0020 /tests/storagebenchmark.cpp
parenta9fb4f869271f47c3a4507d2bc6b8b3d756ec873 (diff)
downloadsink-42c41283304ec8ed75b020ecbec88f30bc198354.tar.gz
sink-42c41283304ec8ed75b020ecbec88f30bc198354.zip
store benchmark results for buffer tests
Diffstat (limited to 'tests/storagebenchmark.cpp')
-rw-r--r--tests/storagebenchmark.cpp15
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
14using namespace Calendar; 15using namespace Calendar;
15using namespace flatbuffers; 16using 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()