/******************************************************************************** * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH * * * * This software is distributed under the terms of the * * GNU Lesser General Public Licence (LGPL) version 3, * * copied verbatim in the file "LICENSE" * ********************************************************************************/ /** * FairMQBenchmarkSampler.h * * @since 2013-04-23 * @author D. Klein, A. Rybalchenko */ #ifndef FAIRMQBENCHMARKSAMPLER_H_ #define FAIRMQBENCHMARKSAMPLER_H_ #include #include #include #include "FairMQDevice.h" /** * Sampler to generate traffic for benchmarking. */ class FairMQBenchmarkSampler : public FairMQDevice { public: FairMQBenchmarkSampler(); virtual ~FairMQBenchmarkSampler(); protected: bool fSameMessage; int fMsgSize; std::atomic fMsgCounter; float fMsgRate; uint64_t fNumIterations; uint64_t fMaxIterations; std::string fOutChannelName; virtual void InitTask() override; virtual void Run() override; }; #endif /* FAIRMQBENCHMARKSAMPLER_H_ */