mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 01:51:45 +00:00
simplify logger for shorter calls and readability
This commit is contained in:
@@ -32,7 +32,7 @@ void FairMQBenchmarkSampler::Init()
|
||||
|
||||
void FairMQBenchmarkSampler::Run()
|
||||
{
|
||||
FairMQLogger::GetInstance()->Log(FairMQLogger::INFO, ">>>>>>> Run <<<<<<<");
|
||||
LOG(INFO) << ">>>>>>> Run <<<<<<<";
|
||||
//boost::this_thread::sleep(boost::posix_time::milliseconds(1000));
|
||||
|
||||
boost::thread rateLogger(boost::bind(&FairMQDevice::LogSocketRates, this));
|
||||
@@ -103,9 +103,7 @@ void FairMQBenchmarkSampler::Log(int intervalInMs)
|
||||
megabytesPerSecond = ((double) (bytesNew - bytes) / (1024. * 1024.)) / (double) timeSinceLastLog_ms * 1000.;
|
||||
messagesPerSecond = (double) (messagesNew - messages) / (double) timeSinceLastLog_ms * 1000.;
|
||||
|
||||
stringstream logmsg;
|
||||
logmsg << "send " << messagesPerSecond << " msg/s, " << megabytesPerSecond << " MB/s";
|
||||
FairMQLogger::GetInstance()->Log(FairMQLogger::DEBUG, logmsg.str());
|
||||
LOG(DEBUG) << "send " << messagesPerSecond << " msg/s, " << megabytesPerSecond << " MB/s";
|
||||
|
||||
bytes = bytesNew;
|
||||
messages = messagesNew;
|
||||
|
Reference in New Issue
Block a user