Commit dcd8071a by 景炳强

debug

parent 7c4861fe
...@@ -163,4 +163,7 @@ private: ...@@ -163,4 +163,7 @@ private:
int sendFrames; int sendFrames;
int64_t sendStartTime; int64_t sendStartTime;
int recvROIs;
int64_t recvROIStartTime;
}; };
\ No newline at end of file
...@@ -6,7 +6,9 @@ int ProcessThread::s_count = 0; ...@@ -6,7 +6,9 @@ int ProcessThread::s_count = 0;
ProcessThread::ProcessThread() ProcessThread::ProcessThread()
: sendFrames(0), : sendFrames(0),
sendStartTime(QDateTime::currentMSecsSinceEpoch()) sendStartTime(QDateTime::currentMSecsSinceEpoch()),
recvROIs(0),
recvROIStartTime(QDateTime::currentMSecsSinceEpoch())
{ {
idx = s_count++; idx = s_count++;
} }
...@@ -53,6 +55,16 @@ void ProcessThread::ReadDatagrams() ...@@ -53,6 +55,16 @@ void ProcessThread::ReadDatagrams()
if(!data.isEmpty()) if(!data.isEmpty())
{ {
taskROIQueue.Push(RoiMessage(data)); taskROIQueue.Push(RoiMessage(data));
recvROIs++;
int64_t elapse = QDateTime::currentMSecsSinceEpoch() - recvROIStartTime;
if (elapse >= 5 * 1000) {
float val = recvROIs * 1000.0 / elapse;
qDebug() << fixed << qSetRealNumberPrecision(2) << "PPProcessThread::run::recvROIs::" << idx << "\t" << val << "\n";
recvROIs = 0;
recvROIStartTime = QDateTime::currentMSecsSinceEpoch();
}
} }
END_SLOT_TIME_COUNTER END_SLOT_TIME_COUNTER
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment