Skip to content

Commit

Permalink
log: show stf reporting difference
Browse files Browse the repository at this point in the history
  • Loading branch information
ironMann committed May 4, 2021
1 parent 14aeda1 commit a011753
Showing 1 changed file with 5 additions and 10 deletions.
15 changes: 5 additions & 10 deletions src/TfScheduler/TfSchedulerStfInfo.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -451,19 +451,14 @@ void TfSchedulerStfInfo::addStfInfo(const StfSenderStfInfo &pStfInfo, SchedulerS
// check if complete
if (lStfIdVector.size() == lNumStfSenders) {
{ // check duration
const std::chrono::steady_clock::duration lTfSchedDur = lStfIdVector.rbegin()->mUpdateLocalTime -
const std::chrono::duration<double, std::milli> lTfSchedDur = lStfIdVector.rbegin()->mUpdateLocalTime -
lStfIdVector.begin()->mUpdateLocalTime;

sCompleteTfDurAvg += (lTfSchedDur / 10 - sCompleteTfDurAvg / 10);
sCompleteTfDurAvg += (lTfSchedDur / 16 - sCompleteTfDurAvg / 16);
sCompleteTfDurMax = std::max(lTfSchedDur, sCompleteTfDurMax);

const auto lDurAboveAvg = lTfSchedDur - sCompleteTfDurAvg;

if (lDurAboveAvg > std::chrono::steady_clock::duration(0) && lDurAboveAvg > sCompleteTfDurMax) {
sCompleteTfDurMax = lDurAboveAvg;
}

DDDLOG_GRL(2000, "STFUpdateComplete: collected {} STFs. mean_dur_ms={} max_dur_ms={}",
lNumStfSenders, lDurAboveAvg.count(), sCompleteTfDurMax.count());
DDDLOG_GRL(1000, "STFUpdateComplete: collected {} STFs. current_dur_ms={:.3} mean_dur_ms={:.3} max_dur_ms={:.3}",
lNumStfSenders, lTfSchedDur.count(), sCompleteTfDurAvg.count(), sCompleteTfDurMax.count());
}

auto lInfoNode = mStfInfoMap.extract(lStfId);
Expand Down

0 comments on commit a011753

Please sign in to comment.