Skip to content

Commit

Permalink
Merge pull request hpcc-systems#19196 from ghalliday/issue32799
Browse files Browse the repository at this point in the history
HPCC-32799 Minor improvements to lookahead timing code

Reviewed-By: Shamser Ahmed <[email protected]>
Merged-by: Gavin Halliday <[email protected]>
  • Loading branch information
ghalliday authored Oct 16, 2024
2 parents 50db25e + 8783739 commit 7bf4acc
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 9 deletions.
17 changes: 9 additions & 8 deletions thorlcr/activities/thactivityutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -120,21 +120,22 @@ class CRowStreamLookAhead : public CSimpleInterfaceOf<IStartableEngineRowStream>
while (requiredLeft&&running)
{
OwnedConstThorRow row;
bool eog = false;
{
LookAheadTimer timer(activity.getActivityTimerAccumulator(), activity.queryTimeActivities());
row.setown(inputStream->nextRow());
}
if (!row)
{
if (!row)
{
LookAheadTimer timer(activity.getActivityTimerAccumulator(), activity.queryTimeActivities());
row.setown(inputStream->nextRow());
if (!row)
break;
eog = true;
}
if (!row)
break;
else
writer->putRow(NULL); // eog
}

if (unlikely(eog))
writer->putRow(NULL);

++count;
writer->putRow(row.getClear());
if (requiredLeft!=RCUNBOUND)
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/graph/thgraphslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -593,7 +593,7 @@ unsigned __int64 CSlaveActivity::queryLocalCycles() const
const unsigned __int64 blockedCycles = queryBlockedCycles();
if (processCycles < blockedCycles)
{
IWARNLOG("CSlaveActivity::queryLocalCycles - processCycles %" I64F "u < blockedCycles %" I64F "u", processCycles, blockedCycles);
ActPrintLog("CSlaveActivity::queryLocalCycles - process %" I64F "uns < blocked %" I64F "uns", cycle_to_nanosec(processCycles), cycle_to_nanosec(blockedCycles));
return 0;
}
return processCycles-blockedCycles;
Expand Down

0 comments on commit 7bf4acc

Please sign in to comment.