From 9e39e9c72b05110a72ef4e84b4bec8bf3c2404f9 Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Mon, 10 Aug 2015 00:48:36 +0200 Subject: Use the HAWD::Formatter --- tests/hawd/formatter.cpp | 3 +-- tests/storagebenchmark.cpp | 5 +++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/hawd/formatter.cpp b/tests/hawd/formatter.cpp index 9328d44..6d1f6de 100644 --- a/tests/hawd/formatter.cpp +++ b/tests/hawd/formatter.cpp @@ -36,12 +36,11 @@ void Formatter::print(const QString &datasetName, const QStringList &cols, State std::cout << QObject::tr("The dataset %1 could not be loaded; try checking it with the check command").arg(datasetName).toStdString() << std::endl; return; } - print(dataset); + print(dataset, cols); } void Formatter::print(Dataset &dataset, const QStringList &cols) { - QStringList cols; std::cout << dataset.tableHeaders(cols).toStdString() << std::endl; dataset.eachRow( [cols](const Dataset::Row &row) { diff --git a/tests/storagebenchmark.cpp b/tests/storagebenchmark.cpp index 503c3b9..4f6449b 100644 --- a/tests/storagebenchmark.cpp +++ b/tests/storagebenchmark.cpp @@ -3,6 +3,7 @@ #include "calendar_generated.h" #include "hawd/dataset.h" +#include "hawd/formatter.h" #include "common/storage.h" #include @@ -139,7 +140,7 @@ private Q_SLOTS: row.setValue("read", readOpsPerMs); row.setValue("readOps", readOpsPerMs); dataset.insertRow(row); - qDebug() << "Reading took[ms]: " << readDuration << "->" << readOpsPerMs << "ops/ms"; + HAWD::Formatter::print(dataset); } else { qDebug() << "File reading is not implemented."; } @@ -199,7 +200,7 @@ private Q_SLOTS: row.setValue("time", bufferDuration); row.setValue("ops", opsPerMs); dataset.insertRow(row); - qDebug() << "Creating buffers took[ms]: " << bufferDuration << "->" << opsPerMs << "ops/ms"; + HAWD::Formatter::print(dataset); } void testSizes() -- cgit v1.2.3