mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-13 16:46:47 +00:00
git-svn-id: https://subversion.gsi.de/fairroot/fairbase/trunk@22451 0381ead4-6506-0410-b988-94b70fbc4730
45 lines
1.1 KiB
C++
45 lines
1.1 KiB
C++
/*
|
|
* FairMQBenchmarkSampler.h
|
|
*
|
|
* Created on: Apr 23, 2013
|
|
* Author: dklein
|
|
*/
|
|
|
|
#ifndef FAIRMQBENCHMARKSAMPLER_H_
|
|
#define FAIRMQBENCHMARKSAMPLER_H_
|
|
|
|
#include <string>
|
|
#include "FairMQDevice.h"
|
|
#include "TString.h"
|
|
|
|
/**
|
|
* Sampler to generate traffic for benchmarking.
|
|
*/
|
|
|
|
class FairMQBenchmarkSampler: public FairMQDevice
|
|
{
|
|
public:
|
|
enum {
|
|
InputFile = FairMQDevice::Last,
|
|
EventRate,
|
|
EventSize,
|
|
Last
|
|
};
|
|
FairMQBenchmarkSampler();
|
|
virtual ~FairMQBenchmarkSampler();
|
|
void Log(Int_t intervalInMs);
|
|
void ResetEventCounter();
|
|
virtual void SetProperty(const Int_t& key, const TString& value, const Int_t& slot = 0);
|
|
virtual TString GetProperty(const Int_t& key, const TString& default_ = "", const Int_t& slot = 0);
|
|
virtual void SetProperty(const Int_t& key, const Int_t& value, const Int_t& slot = 0);
|
|
virtual Int_t GetProperty(const Int_t& key, const Int_t& default_ = 0, const Int_t& slot = 0);
|
|
protected:
|
|
Int_t fEventSize;
|
|
Int_t fEventRate;
|
|
Int_t fEventCounter;
|
|
virtual void Init();
|
|
virtual void Run();
|
|
};
|
|
|
|
#endif /* FAIRMQBENCHMARKSAMPLER_H_ */
|