Commit 83b2d62e authored by oscar's avatar oscar

打印平均时间

parent 43e16408
......@@ -143,7 +143,22 @@ void TrackingRos::ThreadTrackingProcess()
uint64_t begin = GetCurTime();
m_tracker.Run(input, detectionsId, updateId, lostId);
SDK_LOG(SDK_INFO, "m_tracker.Run time = %llu", GetCurTime() - begin);
uint64_t rTime = GetCurTime() - begin;
SDK_LOG(SDK_INFO, "m_tracker.Run time = %llu", rTime);
static int count = 0;
count++;
static uint64_t totelTime = 0;
totelTime += rTime;
static uint64_t countBegin = 0;
if (countBegin == 0)
countBegin = GetCurTime();
if (GetCurTime() - countBegin > 3000 * 1000)
{
SDK_LOG(SDK_INFO, "run kf average time = %llu", totelTime/counts);
countBegin = GetCurTime();
count = 0;
totelTime = 0;
}
std::map<uint64_t, std::shared_ptr<Track3D> >& trackers = m_tracker.GetStates();
......
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