Skip to content

Commit

Permalink
HPCC-32933 Track lookahead time for loop activity
Browse files Browse the repository at this point in the history
Signed-off-by: Shamser Ahmed <shamser.ahmed@lexisnexis.com>
  • Loading branch information
shamser committed Jan 7, 2025
1 parent 1751abf commit f7ea184
Showing 1 changed file with 25 additions and 5 deletions.
30 changes: 25 additions & 5 deletions thorlcr/activities/loop/thloopslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,32 @@ class CLoopSlaveActivity : public CLoopSlaveActivityBase
{
while (!abortSoon)
{
OwnedConstThorRow ret = (void *)curInput->nextRow();
if (!ret)
OwnedConstThorRow ret;
{
ret.setown(curInput->nextRow()); // more cope with groups somehow....
if (!ret)
break;
if (loopCounter==1)
{
// The disk reads occur in the first iteration only so track lookahead time
// in the first iteration only. In subsequent iterations, it is reading the
// output from previous iterations.
LookAheadTimer t(slaveTimerStats, timeActivities);
ret.setown(curInput->nextRow());
if (!ret)
{
ret.setown(curInput->nextRow()); // more cope with groups somehow....
if (!ret)
break;
}
}
else
{
ret.setown(curInput->nextRow());
if (!ret)
{
ret.setown(curInput->nextRow()); // more cope with groups somehow....
if (!ret)
break;
}
}
}

if (finishedLooping ||
Expand Down

0 comments on commit f7ea184

Please sign in to comment.