From 888ad90c62023dedfedf46532382b75aed6231e1 Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Thu, 3 Oct 2024 13:10:01 +0100 Subject: [PATCH] HPCC-32922 Capture lookahead timings for join activities Signed-off-by: Shamser Ahmed --- thorlcr/activities/join/thjoinslave.cpp | 6 ++++-- thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp | 1 + thorlcr/activities/lookupjoin/thlookupjoinslave.cpp | 3 +++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/thorlcr/activities/join/thjoinslave.cpp b/thorlcr/activities/join/thjoinslave.cpp index f2262256ab7..a78c335405b 100644 --- a/thorlcr/activities/join/thjoinslave.cpp +++ b/thorlcr/activities/join/thjoinslave.cpp @@ -265,8 +265,10 @@ class JoinSlaveActivity : public CSlaveActivity, implements ILookAheadStopNotify { try { - startInput(secondaryInputIndex); - + { + LookAheadTimer t(slaveTimerStats, timeActivities); + startInput(secondaryInputIndex); + } if (ensureStartFTLookAhead(secondaryInputIndex)) { IThorDataLink *secondaryInput = queryInput(secondaryInputIndex); diff --git a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp index 46e7a05302c..cc8f03a9d61 100644 --- a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp +++ b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp @@ -2662,6 +2662,7 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem } void readAhead() { + LookAheadTimer t(slaveTimerStats, timeActivities); endOfInput = false; CJoinGroup *groupStart = nullptr; unsigned __int64 preFiltered = 0; diff --git a/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp b/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp index 69e0651c2bb..1b2d53db7d4 100644 --- a/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp +++ b/thorlcr/activities/lookupjoin/thlookupjoinslave.cpp @@ -1447,6 +1447,7 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper, IBitSet *queryRhsChannelStopSet() { dbgassertex(0 == queryJobChannelNumber()); return rhsChannelStop; } void startLeftInput() { + LookAheadTimer t(slaveTimerStats, timeActivities); try { startInput(0); @@ -1565,6 +1566,7 @@ class CInMemJoinBase : public CSlaveActivity, public CAllOrLookupHelper, CAsyncCallStart asyncLeftStart(std::bind(&CInMemJoinBase::startLeftInput, this)); try { + ActivityTimer s(slaveTimerStats, timeActivities); startInput(1); rhsStartedBefore = true; } @@ -2827,6 +2829,7 @@ class CLookupJoinActivityBase : public CInMemJoinBaseisGrouped() == grouped)); // std. lookup join expects these to match }