diff options
author | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-05 02:32:06 +0200 |
---|---|---|
committer | Henning Baldersheim <balder@yahoo-inc.com> | 2017-04-23 02:03:47 +0200 |
commit | b57308e4a134fb6139d2cb52a031d3e7185f16cf (patch) | |
tree | 7c31d445e2f76bb737ef90ce29e0e7e6738d6eb1 /vbench/src | |
parent | 40b8ba5a3f34028d208d4e0dc1b46940d6fe5a47 (diff) |
Use override
Diffstat (limited to 'vbench/src')
31 files changed, 78 insertions, 154 deletions
diff --git a/vbench/src/apps/dumpurl/dumpurl.cpp b/vbench/src/apps/dumpurl/dumpurl.cpp index 706dd061763..44ebc1d2ac2 100644 --- a/vbench/src/apps/dumpurl/dumpurl.cpp +++ b/vbench/src/apps/dumpurl/dumpurl.cpp @@ -1,8 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> + #include <vbench/http/http_result_handler.h> #include <vbench/http/server_spec.h> #include <vbench/http/http_client.h> +#include <vespa/fastos/app.h> using namespace vbench; @@ -13,14 +14,14 @@ public: }; struct MyHttpHandler : public HttpResultHandler { - virtual void handleHeader(const string &name, const string &value) override { + void handleHeader(const string &name, const string &value) override { fprintf(stderr, "got header: '%s': '%s'\n", name.c_str(), value.c_str()); } - virtual void handleContent(const Memory &data) override { + void handleContent(const Memory &data) override { fprintf(stderr, "got data: %zu bytes\n", data.size); fwrite(data.data, 1, data.size, stdout); } - virtual void handleFailure(const string &reason) override { + void handleFailure(const string &reason) override { fprintf(stderr, "got FAILURE: '%s'\n", reason.c_str()); } }; diff --git a/vbench/src/apps/vbench/vbench.cpp b/vbench/src/apps/vbench/vbench.cpp index 32af3d70c3d..fa6bc91e035 100644 --- a/vbench/src/apps/vbench/vbench.cpp +++ b/vbench/src/apps/vbench/vbench.cpp @@ -1,13 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. -#include <vespa/fastos/fastos.h> #include <vespa/vespalib/util/signalhandler.h> #include <vespa/vespalib/util/programoptions.h> #include <vespa/vespalib/util/sync.h> #include <vespa/vespalib/util/thread.h> #include <vespa/vespalib/util/runnable_pair.h> #include <vbench/vbench/vbench.h> -#include <vespa/vespalib/data/slime/slime.h> -#include <string> #include <iostream> using namespace vbench; @@ -17,7 +14,7 @@ typedef vespalib::SignalHandler SIG; struct NotifyDone : public vespalib::Runnable { vespalib::Gate &done; NotifyDone(vespalib::Gate &d) : done(d) {} - virtual void run() override { + void run() override { done.countDown(); } }; diff --git a/vbench/src/tests/dispatcher/dispatcher_test.cpp b/vbench/src/tests/dispatcher/dispatcher_test.cpp index 284f7c55d8a..0a278508d55 100644 --- a/vbench/src/tests/dispatcher/dispatcher_test.cpp +++ b/vbench/src/tests/dispatcher/dispatcher_test.cpp @@ -7,14 +7,14 @@ using namespace vbench; struct MyHandler : public Handler<int> { int value; MyHandler() : value(-1) {} - virtual void handle(std::unique_ptr<int> v) override { value = (v.get() != 0) ? *v : 0; } + void handle(std::unique_ptr<int> v) override { value = (v.get() != 0) ? *v : 0; } }; struct Fetcher : public vespalib::Runnable { Provider<int> &provider; Handler<int> &handler; Fetcher(Provider<int> &p, Handler<int> &h) : provider(p), handler(h) {} - virtual void run() override { handler.handle(provider.provide()); } + void run() override { handler.handle(provider.provide()); } }; TEST("dispatcher") { diff --git a/vbench/src/tests/handler_thread/handler_thread_test.cpp b/vbench/src/tests/handler_thread/handler_thread_test.cpp index a21bda82b6a..e8816e1cc96 100644 --- a/vbench/src/tests/handler_thread/handler_thread_test.cpp +++ b/vbench/src/tests/handler_thread/handler_thread_test.cpp @@ -6,7 +6,7 @@ using namespace vbench; struct MyHandler : Handler<int> { std::vector<int> values; - virtual void handle(std::unique_ptr<int> value) override { + void handle(std::unique_ptr<int> value) override { values.push_back(*value); vespalib::Thread::sleep(10); // for improved coverage } diff --git a/vbench/src/tests/socket/socket_test.cpp b/vbench/src/tests/socket/socket_test.cpp index 21c410f382e..56499a089b6 100644 --- a/vbench/src/tests/socket/socket_test.cpp +++ b/vbench/src/tests/socket/socket_test.cpp @@ -34,7 +34,7 @@ struct Agent { struct Client : public Agent, public vespalib::Runnable { Client(Stream::UP s) : Agent(std::move(s)) {} - virtual void run() override { + void run() override { TEST_THREAD("client"); write("client-"); read("server-"); @@ -43,7 +43,7 @@ struct Client : public Agent, public vespalib::Runnable { struct Server : public Agent, public vespalib::Runnable { Server(Stream::UP s) : Agent(std::move(s)) {} - virtual void run() override { + void run() override { TEST_THREAD("server"); read("client-"); write("server-"); diff --git a/vbench/src/vbench/core/handler.h b/vbench/src/vbench/core/handler.h index 962e6c09ad7..3959688d949 100644 --- a/vbench/src/vbench/core/handler.h +++ b/vbench/src/vbench/core/handler.h @@ -17,4 +17,3 @@ struct Handler }; } // namespace vbench - diff --git a/vbench/src/vbench/core/input_file_reader.h b/vbench/src/vbench/core/input_file_reader.h index 410f0819d3b..5883faab9aa 100644 --- a/vbench/src/vbench/core/input_file_reader.h +++ b/vbench/src/vbench/core/input_file_reader.h @@ -4,9 +4,9 @@ #include "string.h" #include "taintable.h" +#include "line_reader.h" #include <vespa/vespalib/io/mapped_file_input.h> #include <vespa/vespalib/data/input_reader.h> -#include "line_reader.h" namespace vbench { @@ -34,7 +34,7 @@ public: **/ bool readLine(string &dst); - virtual const Taint &tainted() const override { return _taint; } + const Taint &tainted() const override { return _taint; } }; } // namespace vbench diff --git a/vbench/src/vbench/core/socket.cpp b/vbench/src/vbench/core/socket.cpp index 7306d25cf32..e11acdb864c 100644 --- a/vbench/src/vbench/core/socket.cpp +++ b/vbench/src/vbench/core/socket.cpp @@ -40,6 +40,8 @@ Socket::Socket(const string &host, int port) } } +Socket::~Socket() { } + Memory Socket::obtain() { diff --git a/vbench/src/vbench/core/socket.h b/vbench/src/vbench/core/socket.h index e961994c37a..a447dd4d592 100644 --- a/vbench/src/vbench/core/socket.h +++ b/vbench/src/vbench/core/socket.h @@ -29,12 +29,13 @@ private: public: Socket(vespalib::SocketHandle socket); Socket(const string &host, int port); - virtual bool eof() const override { return _eof; } - virtual Memory obtain() override; - virtual Input &evict(size_t bytes) override; - virtual WritableMemory reserve(size_t bytes) override; - virtual Output &commit(size_t bytes) override; - virtual const Taint &tainted() const override { return _taint; } + ~Socket(); + bool eof() const override { return _eof; } + Memory obtain() override; + Input &evict(size_t bytes) override; + WritableMemory reserve(size_t bytes) override; + Output &commit(size_t bytes) override; + const Taint &tainted() const override { return _taint; } }; struct ServerSocket { @@ -53,4 +54,3 @@ struct ServerSocket { }; } // namespace vbench - diff --git a/vbench/src/vbench/core/string.h b/vbench/src/vbench/core/string.h index 61a2b3b442c..592e63e9cbf 100644 --- a/vbench/src/vbench/core/string.h +++ b/vbench/src/vbench/core/string.h @@ -10,6 +10,8 @@ #include <string> #endif +#include <vector> + namespace vbench { // define which string class to use diff --git a/vbench/src/vbench/core/taintable.cpp b/vbench/src/vbench/core/taintable.cpp index 23e2745999a..34d65513ca7 100644 --- a/vbench/src/vbench/core/taintable.cpp +++ b/vbench/src/vbench/core/taintable.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 <vespa/fastos/fastos.h> #include "taintable.h" namespace vbench { @@ -9,8 +8,9 @@ namespace { struct Untaintable : Taintable { Taint taint; - virtual const Taint &tainted() const override { return taint; } - virtual ~Untaintable() {} + + const Taint &tainted() const override { return taint; } + ~Untaintable() {} }; Untaintable untaintable; diff --git a/vbench/src/vbench/http/benchmark_headers.cpp b/vbench/src/vbench/http/benchmark_headers.cpp index e4bea82023d..c42af2a79c7 100644 --- a/vbench/src/vbench/http/benchmark_headers.cpp +++ b/vbench/src/vbench/http/benchmark_headers.cpp @@ -1,7 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include <vespa/fastos/fastos.h> #include "benchmark_headers.h" #include <map> @@ -77,7 +75,7 @@ BenchmarkHeaders::toString() const struct HeaderToString : benchmark_headers::HeaderTraverser { string &str; HeaderToString(string &s) : str(s) {} - virtual void header(const string &name, double value) override { + void header(const string &name, double value) override { str += strfmt(" %s: %g\n", name.c_str(), value); } } headerToString(str); diff --git a/vbench/src/vbench/http/http_result_handler.h b/vbench/src/vbench/http/http_result_handler.h index 85c230fefb8..18e8955b65e 100644 --- a/vbench/src/vbench/http/http_result_handler.h +++ b/vbench/src/vbench/http/http_result_handler.h @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once #include <vbench/core/string.h> @@ -23,4 +22,3 @@ struct HttpResultHandler }; } // namespace vbench - diff --git a/vbench/src/vbench/test/request_receptor.h b/vbench/src/vbench/test/request_receptor.h index 2de39e528e4..0692c3735f6 100644 --- a/vbench/src/vbench/test/request_receptor.h +++ b/vbench/src/vbench/test/request_receptor.h @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once #include <vbench/core/handler.h> @@ -11,7 +10,7 @@ namespace vbench { struct RequestReceptor : public Handler<Request> { Request::UP request; RequestReceptor() : request() {} - virtual void handle(Request::UP req) override; + void handle(Request::UP req) override; }; } // namespace vbench diff --git a/vbench/src/vbench/vbench/analyzer.h b/vbench/src/vbench/vbench/analyzer.h index e1bd8e23919..f206130cc0b 100644 --- a/vbench/src/vbench/vbench/analyzer.h +++ b/vbench/src/vbench/vbench/analyzer.h @@ -1,12 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> -#include <vbench/core/handler.h> - #include "request.h" +#include <vbench/core/handler.h> namespace vbench { @@ -18,4 +15,3 @@ struct Analyzer : public Handler<Request> }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/dropped_tagger.h b/vbench/src/vbench/vbench/dropped_tagger.h index eb64d4b4be4..a3fd7a65b99 100644 --- a/vbench/src/vbench/vbench/dropped_tagger.h +++ b/vbench/src/vbench/vbench/dropped_tagger.h @@ -1,11 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> - #include "request.h" +#include <vbench/core/handler.h> namespace vbench { @@ -19,8 +17,7 @@ private: public: DroppedTagger(Handler<Request> &next); - virtual void handle(Request::UP request) override; + void handle(Request::UP request) override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/generator.h b/vbench/src/vbench/vbench/generator.h index 5eb8e056265..51309eaf9b6 100644 --- a/vbench/src/vbench/vbench/generator.h +++ b/vbench/src/vbench/vbench/generator.h @@ -1,11 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> -#include <vespa/vespalib/util/runnable.h> #include <vbench/core/taintable.h> +#include <vespa/vespalib/util/runnable.h> +#include <memory> namespace vbench { diff --git a/vbench/src/vbench/vbench/ignore_before.h b/vbench/src/vbench/vbench/ignore_before.h index d74a398efd8..a2786a0c340 100644 --- a/vbench/src/vbench/vbench/ignore_before.h +++ b/vbench/src/vbench/vbench/ignore_before.h @@ -1,11 +1,10 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> #include "request.h" #include "analyzer.h" +#include <vbench/core/handler.h> namespace vbench { @@ -22,9 +21,8 @@ private: public: IgnoreBefore(double time, Handler<Request> &next); - virtual void handle(Request::UP request) override; - virtual void report() override; + void handle(Request::UP request) override; + void report() override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/latency_analyzer.cpp b/vbench/src/vbench/vbench/latency_analyzer.cpp index 32cd6387722..baefa0ab138 100644 --- a/vbench/src/vbench/vbench/latency_analyzer.cpp +++ b/vbench/src/vbench/vbench/latency_analyzer.cpp @@ -1,7 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - -#include <vespa/fastos/fastos.h> #include "latency_analyzer.h" #include <cmath> diff --git a/vbench/src/vbench/vbench/latency_analyzer.h b/vbench/src/vbench/vbench/latency_analyzer.h index 499f6f3b991..162fa93a0a3 100644 --- a/vbench/src/vbench/vbench/latency_analyzer.h +++ b/vbench/src/vbench/vbench/latency_analyzer.h @@ -1,11 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> -#include <vbench/core/string.h> -#include "request.h" #include "analyzer.h" namespace vbench { @@ -39,11 +35,10 @@ public: string toString() const; }; LatencyAnalyzer(Handler<Request> &next); - virtual void handle(Request::UP request) override; - virtual void report() override; + void handle(Request::UP request) override; + void report() override; void addLatency(double latency); Stats getStats() const; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/qps_analyzer.h b/vbench/src/vbench/vbench/qps_analyzer.h index 4b4b4997f62..10625a89762 100644 --- a/vbench/src/vbench/vbench/qps_analyzer.h +++ b/vbench/src/vbench/vbench/qps_analyzer.h @@ -1,10 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> -#include "request.h" #include "analyzer.h" namespace vbench { @@ -24,10 +21,9 @@ private: public: QpsAnalyzer(Handler<Request> &next); - virtual void handle(Request::UP request) override; - virtual void report() override; + void handle(Request::UP request) override; + void report() override; void addEndTime(double end); }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/qps_tagger.h b/vbench/src/vbench/vbench/qps_tagger.h index 452ee8fb827..492ae324dc0 100644 --- a/vbench/src/vbench/vbench/qps_tagger.h +++ b/vbench/src/vbench/vbench/qps_tagger.h @@ -1,12 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> - -#include "request.h" #include "tagger.h" +#include "request.h" namespace vbench { @@ -22,8 +19,7 @@ private: public: QpsTagger(double qps, Handler<Request> &next); - virtual void handle(Request::UP request) override; + void handle(Request::UP request) override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/request.h b/vbench/src/vbench/vbench/request.h index 4951c96fbab..c3eab1ab75b 100644 --- a/vbench/src/vbench/vbench/request.h +++ b/vbench/src/vbench/vbench/request.h @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once #include <vbench/core/string.h> @@ -68,9 +67,9 @@ public: double latency() const { return (_endTime - _startTime); } - virtual void handleHeader(const string &name, const string &value) override; - virtual void handleContent(const Memory &data) override; - virtual void handleFailure(const string &reason) override; + void handleHeader(const string &name, const string &value) override; + void handleContent(const Memory &data) override; + void handleFailure(const string &reason) override; const BenchmarkHeaders &headers() const { return _headers; } @@ -78,4 +77,3 @@ public: }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/request_dumper.h b/vbench/src/vbench/vbench/request_dumper.h index aede956477c..a06e7224c4f 100644 --- a/vbench/src/vbench/vbench/request_dumper.h +++ b/vbench/src/vbench/vbench/request_dumper.h @@ -1,11 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/core/handler.h> - -#include "request.h" #include "analyzer.h" namespace vbench { @@ -21,9 +17,8 @@ private: public: RequestDumper(Handler<Request> &_next); - virtual void handle(Request::UP request) override; - virtual void report() override; + void handle(Request::UP request) override; + void report() override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/request_generator.h b/vbench/src/vbench/vbench/request_generator.h index 38f2c7ad7f8..ac2b18cf928 100644 --- a/vbench/src/vbench/vbench/request_generator.h +++ b/vbench/src/vbench/vbench/request_generator.h @@ -1,16 +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 <vespa/vespalib/util/runnable.h> +#include "generator.h" +#include "request.h" #include <vbench/core/input_file_reader.h> -#include <vbench/core/taintable.h> #include <vbench/core/handler.h> -#include "request.h" -#include "generator.h" - namespace vbench { /** @@ -25,12 +21,10 @@ private: bool _aborted; public: - RequestGenerator(const string &inputFile, - Handler<Request> &next); + RequestGenerator(const string &inputFile, Handler<Request> &next); void abort() override; - virtual void run() override; - virtual const Taint &tainted() const override { return _input.tainted(); } + void run() override; + const Taint &tainted() const override { return _input.tainted(); } }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/request_scheduler.h b/vbench/src/vbench/vbench/request_scheduler.h index 1de61073d35..60fe4af12fc 100644 --- a/vbench/src/vbench/vbench/request_scheduler.h +++ b/vbench/src/vbench/vbench/request_scheduler.h @@ -1,23 +1,14 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> - -#include <vespa/vespalib/util/sync.h> -#include <vespa/vespalib/util/thread.h> -#include <vespa/vespalib/util/runnable.h> -#include <vespa/vespalib/util/active.h> - -#include <vbench/core/handler.h> +#include "worker.h" +#include "dropped_tagger.h" #include <vbench/core/time_queue.h> #include <vbench/core/dispatcher.h> #include <vbench/core/handler_thread.h> - -#include "request.h" -#include "worker.h" -#include "dropped_tagger.h" +#include <vespa/vespalib/util/sync.h> +#include <vespa/vespalib/util/active.h> namespace vbench { @@ -40,16 +31,15 @@ private: HttpConnectionPool _connectionPool; std::vector<Worker::UP> _workers; - virtual void run() override; + void run() override; public: typedef std::unique_ptr<RequestScheduler> UP; RequestScheduler(Handler<Request> &next, size_t numWorkers); void abort(); - virtual void handle(Request::UP request) override; - virtual void start() override; - virtual RequestScheduler &stop() override; - virtual void join() override; + void handle(Request::UP request) override; + void start() override; + RequestScheduler &stop() override; + void join() override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/request_sink.h b/vbench/src/vbench/vbench/request_sink.h index 37c6ce71fcc..9c9d46775e5 100644 --- a/vbench/src/vbench/vbench/request_sink.h +++ b/vbench/src/vbench/vbench/request_sink.h @@ -1,6 +1,5 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once #include "analyzer.h" @@ -15,9 +14,8 @@ class RequestSink : public Analyzer { public: RequestSink(); - virtual void handle(Request::UP request) override; - virtual void report() override; + void handle(Request::UP request) override; + void report() override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/server_tagger.h b/vbench/src/vbench/vbench/server_tagger.h index 6115873bb0c..5e760dc02e5 100644 --- a/vbench/src/vbench/vbench/server_tagger.h +++ b/vbench/src/vbench/vbench/server_tagger.h @@ -1,13 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <vbench/http/server_spec.h> -#include <vbench/core/handler.h> - -#include "request.h" #include "tagger.h" +#include <vbench/http/server_spec.h> namespace vbench { @@ -21,10 +17,8 @@ private: Handler<Request> &_next; public: - ServerTagger(const ServerSpec &server, - Handler<Request> &next); - virtual void handle(Request::UP request) override; + ServerTagger(const ServerSpec &server, Handler<Request> &next); + void handle(Request::UP request) override; }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/tagger.h b/vbench/src/vbench/vbench/tagger.h index c19319e39e2..225b83d5433 100644 --- a/vbench/src/vbench/vbench/tagger.h +++ b/vbench/src/vbench/vbench/tagger.h @@ -1,12 +1,9 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> -#include <vbench/core/handler.h> - #include "request.h" +#include <vbench/core/handler.h> namespace vbench { @@ -17,4 +14,3 @@ struct Tagger : public Handler<Request> }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/vbench.h b/vbench/src/vbench/vbench/vbench.h index 5796b3dab76..186bdeeac17 100644 --- a/vbench/src/vbench/vbench/vbench.h +++ b/vbench/src/vbench/vbench/vbench.h @@ -1,14 +1,7 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> - -#include <vespa/vespalib/util/runnable.h> -#include <vbench/core/taintable.h> -#include <vespa/vespalib/data/slime/slime.h> - #include "analyzer.h" #include "generator.h" #include "latency_analyzer.h" @@ -20,6 +13,8 @@ #include "request_sink.h" #include "server_tagger.h" #include "tagger.h" +#include <vbench/core/taintable.h> +#include <vespa/vespalib/data/slime/slime.h> namespace vbench { @@ -42,9 +37,8 @@ private: public: VBench(const vespalib::Slime &cfg); void abort(); - virtual void run() override; - virtual const Taint &tainted() const override { return _taint; } + void run() override; + const Taint &tainted() const override { return _taint; } }; } // namespace vbench - diff --git a/vbench/src/vbench/vbench/worker.h b/vbench/src/vbench/vbench/worker.h index cdadaf87cd3..8e9a5119f31 100644 --- a/vbench/src/vbench/vbench/worker.h +++ b/vbench/src/vbench/vbench/worker.h @@ -1,19 +1,14 @@ // Copyright 2016 Yahoo Inc. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. - #pragma once -#include <memory> - -#include <vespa/vespalib/util/runnable.h> -#include <vespa/vespalib/util/thread.h> -#include <vespa/vespalib/util/joinable.h> - +#include "request.h" #include <vbench/core/provider.h> #include <vbench/core/handler.h> #include <vbench/http/http_connection_pool.h> - -#include "request.h" +#include <vespa/vespalib/util/runnable.h> +#include <vespa/vespalib/util/thread.h> +#include <vespa/vespalib/util/joinable.h> namespace vbench { @@ -33,13 +28,12 @@ private: HttpConnectionPool &_pool; Timer &_timer; - virtual void run() override; + void run() override; public: typedef std::unique_ptr<Worker> UP; Worker(Provider<Request> &provider, Handler<Request> &next, HttpConnectionPool &pool, Timer &timer); - virtual void join() override { _thread.join(); } + void join() override { _thread.join(); } }; } // namespace vbench - |