summaryrefslogtreecommitdiffstats
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/databasepopulationandfacadequerybenchmark.cpp11
1 files changed, 11 insertions, 0 deletions
diff --git a/tests/databasepopulationandfacadequerybenchmark.cpp b/tests/databasepopulationandfacadequerybenchmark.cpp
index 77573a0..93f15cb 100644
--- a/tests/databasepopulationandfacadequerybenchmark.cpp
+++ b/tests/databasepopulationandfacadequerybenchmark.cpp
@@ -12,6 +12,9 @@
12#include <common/query.h> 12#include <common/query.h>
13#include <common/clientapi.h> 13#include <common/clientapi.h>
14 14
15#include "hawd/dataset.h"
16#include "hawd/formatter.h"
17
15#include <iostream> 18#include <iostream>
16#include <math.h> 19#include <math.h>
17 20
@@ -31,6 +34,7 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject
31 QByteArray identifier; 34 QByteArray identifier;
32 QList<double> mRssGrowthPerEntity; 35 QList<double> mRssGrowthPerEntity;
33 QList<double> mTimePerEntity; 36 QList<double> mTimePerEntity;
37 HAWD::State mHawdState;
34 38
35 void populateDatabase(int count) 39 void populateDatabase(int count)
36 { 40 {
@@ -129,6 +133,13 @@ class DatabasePopulationAndFacadeQueryBenchmark : public QObject
129 std::cout << "Rss without db [kb]: " << rssWithoutDb/1024 << std::endl; 133 std::cout << "Rss without db [kb]: " << rssWithoutDb/1024 << std::endl;
130 std::cout << "Percentage error: " << percentageRssError << std::endl; 134 std::cout << "Percentage error: " << percentageRssError << std::endl;
131 135
136 HAWD::Dataset dataset("facade_query", mHawdState);
137 HAWD::Dataset::Row row = dataset.row();
138 row.setValue("rows", list.size());
139 row.setValue("queryTimePerResult", (qreal)list.size()/elapsed);
140 dataset.insertRow(row);
141 HAWD::Formatter::print(dataset);
142
132 mTimePerEntity << static_cast<double>(elapsed)/static_cast<double>(count); 143 mTimePerEntity << static_cast<double>(elapsed)/static_cast<double>(count);
133 mRssGrowthPerEntity << rssGrowthPerEntity; 144 mRssGrowthPerEntity << rssGrowthPerEntity;
134 145