From 42c41283304ec8ed75b020ecbec88f30bc198354 Mon Sep 17 00:00:00 2001 From: Aaron Seigo Date: Tue, 9 Dec 2014 22:02:41 +0100 Subject: store benchmark results for buffer tests --- tests/CMakeLists.txt | 2 +- tests/storagebenchmark.cpp | 15 ++++++++++++--- 2 files changed, 13 insertions(+), 4 deletions(-) (limited to 'tests') diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index e63bc1c..9087323 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,7 @@ macro(manual_tests) foreach(_testname ${ARGN}) add_executable(${_testname} ${_testname}.cpp) qt5_use_modules(${_testname} Core Test Concurrent) - target_link_libraries(${_testname} akonadi2common) + target_link_libraries(${_testname} akonadi2common libhawd) endforeach(_testname) endmacro(manual_tests) 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 @@ #include "calendar_generated.h" +#include "hawd/dataset.h" +#include "common/storage.h" + #include #include @@ -9,8 +12,6 @@ #include #include -#include "common/storage.h" - using namespace Calendar; using namespace flatbuffers; @@ -171,6 +172,10 @@ private Q_SLOTS: void testBufferCreation() { + HAWD::State state; + HAWD::Dataset dataset("buffer_creation", state); + HAWD::Dataset::Row row = dataset.row(); + QTime time; time.start(); @@ -180,7 +185,11 @@ private Q_SLOTS: qreal bufferDuration = time.restart(); qreal opsPerMs = count / bufferDuration; - qDebug() << "Creating buffers took[ms]: " << bufferDuration << "->" << opsPerMs << "ops/ms";; + row.setValue("numBuffers", count); + row.setValue("time", bufferDuration); + row.setValue("ops", opsPerMs); + dataset.insertRow(row); + qDebug() << "Creating buffers took[ms]: " << bufferDuration << "->" << opsPerMs << "ops/ms"; } void testSizes() -- cgit v1.2.3