mirror of
https://github.com/FairRootGroup/FairMQ.git
synced 2025-10-16 10:01:47 +00:00
remove custom timestamp stuff from logger wrapper
This commit is contained in:
committed by
Mohammad Al-Turany
parent
a3393e600e
commit
a91c481abf
@@ -188,18 +188,18 @@ void FairMQShmPrototypeSampler::Run()
|
||||
|
||||
void FairMQShmPrototypeSampler::Log(const int intervalInMs)
|
||||
{
|
||||
timestamp_t t0 = get_timestamp();
|
||||
timestamp_t t1;
|
||||
timestamp_t msSinceLastLog;
|
||||
chrono::time_point<chrono::high_resolution_clock> t0 = chrono::high_resolution_clock::now();
|
||||
chrono::time_point<chrono::high_resolution_clock> t1;
|
||||
unsigned long long msSinceLastLog;
|
||||
|
||||
double mbPerSecOut = 0;
|
||||
double msgPerSecOut = 0;
|
||||
|
||||
while (CheckCurrentState(RUNNING))
|
||||
{
|
||||
t1 = get_timestamp();
|
||||
t1 = chrono::high_resolution_clock::now();
|
||||
|
||||
msSinceLastLog = (t1 - t0) / 1000.0L;
|
||||
msSinceLastLog = chrono::duration_cast<chrono::milliseconds>(t1 - t0).count();
|
||||
|
||||
mbPerSecOut = (static_cast<double>(fBytesOutNew - fBytesOut) / (1024. * 1024.)) / static_cast<double>(msSinceLastLog) * 1000.;
|
||||
fBytesOut = fBytesOutNew;
|
||||
|
@@ -115,18 +115,18 @@ void FairMQShmPrototypeSink::Run()
|
||||
|
||||
void FairMQShmPrototypeSink::Log(const int intervalInMs)
|
||||
{
|
||||
timestamp_t t0 = get_timestamp();
|
||||
timestamp_t t1;
|
||||
timestamp_t msSinceLastLog;
|
||||
chrono::time_point<chrono::high_resolution_clock> t0 = chrono::high_resolution_clock::now();
|
||||
chrono::time_point<chrono::high_resolution_clock> t1;
|
||||
unsigned long long msSinceLastLog;
|
||||
|
||||
double mbPerSecIn = 0;
|
||||
double msgPerSecIn = 0;
|
||||
|
||||
while (CheckCurrentState(RUNNING))
|
||||
{
|
||||
t1 = get_timestamp();
|
||||
t1 = chrono::high_resolution_clock::now();
|
||||
|
||||
msSinceLastLog = (t1 - t0) / 1000.0L;
|
||||
msSinceLastLog = chrono::duration_cast<chrono::milliseconds>(t1 - t0).count();
|
||||
|
||||
mbPerSecIn = (static_cast<double>(fBytesInNew - fBytesIn) / (1024. * 1024.)) / static_cast<double>(msSinceLastLog) * 1000.;
|
||||
fBytesIn = fBytesInNew;
|
||||
|
Reference in New Issue
Block a user