summaryrefslogtreecommitdiffstats
path: root/vbench
diff options
context:
space:
mode:
authorHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:02 +0200
committerHenning Baldersheim <balder@yahoo-inc.com>2017-05-02 14:42:02 +0200
commitf2240b85bcae9a0b18340981fdeda279c74e6d56 (patch)
treea1d372680025a54e86e99c74af53d70eee31dd5e /vbench
parent0f646f10b377b90fc37e9911f9fe383d112ff157 (diff)
Fix warnings hidden earlier due to including application headers as system includes
Diffstat (limited to 'vbench')
-rw-r--r--vbench/src/vbench/core/dispatcher.h7
-rw-r--r--vbench/src/vbench/core/dispatcher.hpp3
-rw-r--r--vbench/src/vbench/core/handler_thread.h11
-rw-r--r--vbench/src/vbench/core/input_file_reader.cpp2
-rw-r--r--vbench/src/vbench/core/input_file_reader.h1
-rw-r--r--vbench/src/vbench/core/time_queue.h5
-rw-r--r--vbench/src/vbench/http/http_client.cpp5
-rw-r--r--vbench/src/vbench/http/http_client.h3
-rw-r--r--vbench/src/vbench/http/http_connection_pool.cpp3
-rw-r--r--vbench/src/vbench/http/http_connection_pool.h8
-rw-r--r--vbench/src/vbench/test/simple_http_result_handler.cpp2
-rw-r--r--vbench/src/vbench/test/simple_http_result_handler.h1
-rw-r--r--vbench/src/vbench/vbench/vbench.cpp2
-rw-r--r--vbench/src/vbench/vbench/vbench.h1
14 files changed, 34 insertions, 20 deletions
diff --git a/vbench/src/vbench/core/dispatcher.h b/vbench/src/vbench/core/dispatcher.h
index 29935ef6baa..4b099c8dd75 100644
--- a/vbench/src/vbench/core/dispatcher.h
+++ b/vbench/src/vbench/core/dispatcher.h
@@ -36,10 +36,11 @@ private:
public:
Dispatcher(Handler<T> &fallback);
+ ~Dispatcher();
bool waitForThreads(size_t threads, size_t pollCnt) const;
- virtual void close();
- virtual void handle(std::unique_ptr<T> obj);
- virtual std::unique_ptr<T> provide();
+ void close() override;
+ void handle(std::unique_ptr<T> obj) override;
+ std::unique_ptr<T> provide() override;
};
} // namespace vbench
diff --git a/vbench/src/vbench/core/dispatcher.hpp b/vbench/src/vbench/core/dispatcher.hpp
index b2c14d4ea7a..4f34c678b4e 100644
--- a/vbench/src/vbench/core/dispatcher.hpp
+++ b/vbench/src/vbench/core/dispatcher.hpp
@@ -14,6 +14,9 @@ Dispatcher<T>::Dispatcher(Handler<T> &fallback)
}
template <typename T>
+Dispatcher<T>::~Dispatcher() {}
+
+template <typename T>
bool
Dispatcher<T>::waitForThreads(size_t threads, size_t pollCnt) const
{
diff --git a/vbench/src/vbench/core/handler_thread.h b/vbench/src/vbench/core/handler_thread.h
index cd7b53a6109..24753730b11 100644
--- a/vbench/src/vbench/core/handler_thread.h
+++ b/vbench/src/vbench/core/handler_thread.h
@@ -2,14 +2,13 @@
#pragma once
+#include "handler.h"
#include <vespa/vespalib/util/sync.h>
#include <vespa/vespalib/util/arrayqueue.hpp>
#include <vespa/vespalib/util/thread.h>
#include <vespa/vespalib/util/runnable.h>
#include <vespa/vespalib/util/joinable.h>
-#include "handler.h"
-
namespace vbench {
/**
@@ -31,13 +30,13 @@ private:
vespalib::Thread _thread;
bool _done;
- virtual void run();
+ void run() override;
public:
HandlerThread(Handler<T> &next);
- virtual ~HandlerThread();
- virtual void handle(std::unique_ptr<T> obj);
- virtual void join();
+ ~HandlerThread();
+ void handle(std::unique_ptr<T> obj) override;
+ void join() override;
};
} // namespace vbench
diff --git a/vbench/src/vbench/core/input_file_reader.cpp b/vbench/src/vbench/core/input_file_reader.cpp
index 48a2b4e564e..dd24c3f9f36 100644
--- a/vbench/src/vbench/core/input_file_reader.cpp
+++ b/vbench/src/vbench/core/input_file_reader.cpp
@@ -14,6 +14,8 @@ InputFileReader::InputFileReader(const string &name)
}
}
+InputFileReader::~InputFileReader() {}
+
bool
InputFileReader::readLine(string &dst)
{
diff --git a/vbench/src/vbench/core/input_file_reader.h b/vbench/src/vbench/core/input_file_reader.h
index 5883faab9aa..473df3de73b 100644
--- a/vbench/src/vbench/core/input_file_reader.h
+++ b/vbench/src/vbench/core/input_file_reader.h
@@ -23,6 +23,7 @@ private:
public:
InputFileReader(const string &name);
+ ~InputFileReader();
/**
* Read a single line from the input file and put it into
diff --git a/vbench/src/vbench/core/time_queue.h b/vbench/src/vbench/core/time_queue.h
index b7c287dbdc4..7375b70571d 100644
--- a/vbench/src/vbench/core/time_queue.h
+++ b/vbench/src/vbench/core/time_queue.h
@@ -2,12 +2,11 @@
#pragma once
+#include "closeable.h"
#include <vespa/vespalib/util/priority_queue.h>
#include <vespa/vespalib/util/sync.h>
#include <memory>
-#include "closeable.h"
-
namespace vbench {
/**
@@ -43,7 +42,7 @@ private:
public:
TimeQueue(double window, double tick);
- virtual void close();
+ void close() override;
void discard();
void insert(std::unique_ptr<T> obj, double time);
bool extract(double time, std::vector<std::unique_ptr<T> > &list, double &delay);
diff --git a/vbench/src/vbench/http/http_client.cpp b/vbench/src/vbench/http/http_client.cpp
index f2d0ca0a368..f89a4597178 100644
--- a/vbench/src/vbench/http/http_client.cpp
+++ b/vbench/src/vbench/http/http_client.cpp
@@ -2,14 +2,15 @@
#include "http_client.h"
#include "hex_number.h"
-#include <vespa/vespalib/data/output_writer.h>
#include <vbench/core/line_reader.h>
-#include <algorithm>
+#include <vespa/vespalib/data/output_writer.h>
namespace vbench {
using OutputWriter = vespalib::OutputWriter;
+HttpClient::~HttpClient() {}
+
void
HttpClient::writeRequest() {
OutputWriter dst(_conn->stream(), WRITE_SIZE);
diff --git a/vbench/src/vbench/http/http_client.h b/vbench/src/vbench/http/http_client.h
index 7497d0c8621..076e4ae1770 100644
--- a/vbench/src/vbench/http/http_client.h
+++ b/vbench/src/vbench/http/http_client.h
@@ -3,10 +3,10 @@
#pragma once
-#include <vbench/core/socket.h>
#include "http_connection.h"
#include "http_connection_pool.h"
#include "http_result_handler.h"
+#include <vbench/core/socket.h>
namespace vbench {
@@ -59,6 +59,7 @@ private:
bool perform();
public:
+ ~HttpClient();
static bool fetch(const ServerSpec &server, const string &url,
HttpResultHandler &handler)
{
diff --git a/vbench/src/vbench/http/http_connection_pool.cpp b/vbench/src/vbench/http/http_connection_pool.cpp
index 15d4786c7fd..a9ddf306e8a 100644
--- a/vbench/src/vbench/http/http_connection_pool.cpp
+++ b/vbench/src/vbench/http/http_connection_pool.cpp
@@ -1,6 +1,5 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
#include "http_connection_pool.h"
namespace vbench {
@@ -13,6 +12,8 @@ HttpConnectionPool::HttpConnectionPool(Timer &timer)
{
}
+HttpConnectionPool::~HttpConnectionPool() {}
+
HttpConnection::UP
HttpConnectionPool::getConnection(const ServerSpec &server)
{
diff --git a/vbench/src/vbench/http/http_connection_pool.h b/vbench/src/vbench/http/http_connection_pool.h
index 95a069ef6f1..3a2927c5878 100644
--- a/vbench/src/vbench/http/http_connection_pool.h
+++ b/vbench/src/vbench/http/http_connection_pool.h
@@ -1,13 +1,12 @@
// Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
-
#pragma once
-#include <map>
+#include "http_connection.h"
+#include <vbench/core/timer.h>
#include <vespa/vespalib/util/arrayqueue.hpp>
#include <vespa/vespalib/util/sync.h>
-#include <vbench/core/timer.h>
-#include "http_connection.h"
+#include <map>
namespace vbench {
@@ -29,6 +28,7 @@ private:
public:
HttpConnectionPool(Timer &timer);
+ ~HttpConnectionPool();
HttpConnection::UP getConnection(const ServerSpec &server);
void putConnection(HttpConnection::UP conn);
};
diff --git a/vbench/src/vbench/test/simple_http_result_handler.cpp b/vbench/src/vbench/test/simple_http_result_handler.cpp
index 64f55dfb3da..8c8289fd859 100644
--- a/vbench/src/vbench/test/simple_http_result_handler.cpp
+++ b/vbench/src/vbench/test/simple_http_result_handler.cpp
@@ -13,6 +13,8 @@ SimpleHttpResultHandler::SimpleHttpResultHandler()
{
}
+SimpleHttpResultHandler::~SimpleHttpResultHandler() {}
+
void
SimpleHttpResultHandler::handleHeader(const string &name, const string &value)
{
diff --git a/vbench/src/vbench/test/simple_http_result_handler.h b/vbench/src/vbench/test/simple_http_result_handler.h
index a58a4cea8af..227593e2e92 100644
--- a/vbench/src/vbench/test/simple_http_result_handler.h
+++ b/vbench/src/vbench/test/simple_http_result_handler.h
@@ -19,6 +19,7 @@ private:
public:
SimpleHttpResultHandler();
+ ~SimpleHttpResultHandler();
virtual void handleHeader(const string &name, const string &value) override;
virtual void handleContent(const Memory &data) override;
virtual void handleFailure(const string &reason) override;
diff --git a/vbench/src/vbench/vbench/vbench.cpp b/vbench/src/vbench/vbench/vbench.cpp
index 786573ed588..dcc3ecda542 100644
--- a/vbench/src/vbench/vbench/vbench.cpp
+++ b/vbench/src/vbench/vbench/vbench.cpp
@@ -44,6 +44,8 @@ VBench::VBench(const vespalib::Slime &cfg)
}
}
+VBench::~VBench() {}
+
void
VBench::abort()
{
diff --git a/vbench/src/vbench/vbench/vbench.h b/vbench/src/vbench/vbench/vbench.h
index 186bdeeac17..8fda1635ce8 100644
--- a/vbench/src/vbench/vbench/vbench.h
+++ b/vbench/src/vbench/vbench/vbench.h
@@ -36,6 +36,7 @@ private:
public:
VBench(const vespalib::Slime &cfg);
+ ~VBench();
void abort();
void run() override;
const Taint &tainted() const override { return _taint; }