mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-15 09:31:45 +00:00
Adding multiple transports support & other fixes:
- Avoid polling when only one input channel is used. - Send only handles for shared memory transport. - Avoid waiting in the rate logger thread when nothing to log. - Hide warnings from generated files - Fix #483
This commit is contained in:
committed by
Mohammad Al-Turany
parent
e53ad151a7
commit
c66fd6fe91
@@ -51,10 +51,10 @@ void FairMQBenchmarkSampler::Run()
|
||||
|
||||
uint64_t numSentMsgs = 0;
|
||||
|
||||
FairMQMessagePtr baseMsg(fTransportFactory->CreateMessage(fMsgSize));
|
||||
|
||||
// store the channel reference to avoid traversing the map on every loop iteration
|
||||
const FairMQChannel& dataOutChannel = fChannels.at(fOutChannelName).at(0);
|
||||
FairMQChannel& dataOutChannel = fChannels.at(fOutChannelName).at(0);
|
||||
|
||||
FairMQMessagePtr baseMsg(dataOutChannel.Transport()->CreateMessage(fMsgSize));
|
||||
|
||||
LOG(INFO) << "Starting the benchmark with message size of " << fMsgSize << " and number of messages " << fNumMsgs << ".";
|
||||
auto tStart = chrono::high_resolution_clock::now();
|
||||
@@ -63,7 +63,7 @@ void FairMQBenchmarkSampler::Run()
|
||||
{
|
||||
if (fSameMessage)
|
||||
{
|
||||
FairMQMessagePtr msg(fTransportFactory->CreateMessage());
|
||||
FairMQMessagePtr msg(dataOutChannel.Transport()->CreateMessage());
|
||||
msg->Copy(baseMsg);
|
||||
|
||||
if (dataOutChannel.Send(msg) >= 0)
|
||||
@@ -80,7 +80,7 @@ void FairMQBenchmarkSampler::Run()
|
||||
}
|
||||
else
|
||||
{
|
||||
FairMQMessagePtr msg(fTransportFactory->CreateMessage(fMsgSize));
|
||||
FairMQMessagePtr msg(dataOutChannel.Transport()->CreateMessage(fMsgSize));
|
||||
|
||||
if (dataOutChannel.Send(msg) >= 0)
|
||||
{
|
||||
|
Reference in New Issue
Block a user