// Copyright Vespa.ai. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root. #pragma once #include "generator.h" #include "request.h" #include #include namespace vbench { /** * Reads lines from an input file and generates requests that are * passed to a request handler. **/ class RequestGenerator : public Generator { private: InputFileReader _input; Handler &_next; bool _aborted; public: RequestGenerator(const string &inputFile, Handler &next); ~RequestGenerator() override; void abort() override; void run() override; const Taint &tainted() const override { return _input.tainted(); } }; } // namespace vbench