From bebbc07a1c517fd9020a83a5de3efcca5b0dccca Mon Sep 17 00:00:00 2001 From: Christian Mollekopf Date: Thu, 11 May 2017 11:58:15 +0200 Subject: Fixed benchmark --- tests/hawd/state.cpp | 2 +- tests/mailquerybenchmark.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) (limited to 'tests') diff --git a/tests/hawd/state.cpp b/tests/hawd/state.cpp index 46b5f28..dfeef41 100644 --- a/tests/hawd/state.cpp +++ b/tests/hawd/state.cpp @@ -117,7 +117,7 @@ void State::findGitHash() { #ifdef HAVE_LIBGIT2 git_libgit2_init(); - git_buf root; + git_buf root = {0}; int error = git_repository_discover(&root, projectPath().toStdString().data(), 0, NULL); if (!error) { git_repository *repo = NULL; diff --git a/tests/mailquerybenchmark.cpp b/tests/mailquerybenchmark.cpp index b15c8d6..00c156d 100644 --- a/tests/mailquerybenchmark.cpp +++ b/tests/mailquerybenchmark.cpp @@ -78,7 +78,7 @@ class MailQueryBenchmark : public QObject entityStore.commitTransaction(); } - void testLoad(const Sink::Query &query, int count, int expectedSize) + void testLoad(const QByteArray &name, const Sink::Query &query, int count, int expectedSize) { const auto startingRss = getCurrentRSS(); @@ -124,7 +124,7 @@ class MailQueryBenchmark : public QObject std::cout << "Rss without db [kb]: " << rssWithoutDb / 1024 << std::endl; std::cout << "Percentage error: " << percentageRssError << std::endl; - HAWD::Dataset dataset("mail_query", mHawdState); + HAWD::Dataset dataset(QString{"mail_query"} + name, mHawdState); HAWD::Dataset::Row row = dataset.row(); row.setValue("rows", list.size()); row.setValue("queryResultPerMs", (qreal)list.size() / elapsed); @@ -159,7 +159,7 @@ private slots: query.limit(1000); populateDatabase(50000); - testLoad(query, 50000, query.limit()); + testLoad({}, query, 50000, query.limit()); } void test50kThreadleader() @@ -176,7 +176,7 @@ private slots: int count = 50000; populateDatabase(count, mailsPerFolder); - testLoad(query, count, query.limit()); + testLoad("_threadleader", query, count, query.limit()); } }; -- cgit v1.2.3