Skip to content

Commit

Permalink
HPCC-32931 Changes following review
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 Nov 6, 2024
1 parent ebafeda commit 2d4617c
Showing 1 changed file with 12 additions and 4 deletions.
16 changes: 12 additions & 4 deletions thorlcr/activities/nsplitter/thnsplitterslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,9 @@ class CSplitterOutput : public CSimpleInterfaceOf<IStartableEngineRowStream>, pu
virtual bool isInputOrdered(bool consumerOrdered) const override;
virtual void setOutputStream(unsigned index, IEngineRowStream *stream) override;
virtual IStrandJunction *getOutputStreams(CActivityBase &ctx, unsigned idx, PointerArrayOf<IEngineRowStream> &streams, const CThorStrandOptions * consumerOptions, bool consumerOrdered, IOrderedCallbackCollection * orderedCallbacks) override;
// queryTotalCycles is used by downstream activities for the purpose of calculating local execute time.
// queryTotalCycles should include all time taken in start() and nextRow() methods.
// n.b. This totalCycles are not actually reported - it is only used by downstream activities.
virtual unsigned __int64 queryTotalCycles() const override { return COutputTiming::queryTotalCycles(); }
virtual unsigned __int64 queryEndCycles() const override { return COutputTiming::queryEndCycles(); }
virtual unsigned __int64 queryBlockedCycles() const { return COutputTiming::queryBlockedCycles(); }
Expand All @@ -77,6 +80,13 @@ class CSplitterOutput : public CSimpleInterfaceOf<IStartableEngineRowStream>, pu
//
// NSplitterSlaveActivity
//
// Note regarding NSplitterSlaveActivity::COutputTiming methods:
// - queryTotalCycles in NSplitterSlaveActivity is not used by downstream
// activities (like they are in other activities). Downstream activities
// use CSplitterOutput::queryTotalCycles for the purposes of calculating
// local execute time
// - totalCycles in this class is reported as the activity's StTotalExecuteTime
// and it is used to calculate & report the StLocalExecuteTime.

class NSplitterSlaveActivity : public CSlaveActivity, implements ISharedSmartBufferCallback
{
Expand Down Expand Up @@ -212,15 +222,13 @@ class NSplitterSlaveActivity : public CSlaveActivity, implements ISharedSmartBuf
if (!inputPrepared)
{
inputPrepared = true;
ActivityTimer t(slaveTimerStats, queryTimeActivities());
try
{
assertex(((unsigned)-1) != connectedOutputCount);
activeOutputCount = connectedOutputCount;

{
ActivityTimer t(slaveTimerStats, queryTimeActivities());
PARENT::start();
}
PARENT::start();
initMetaInfo(cachedMetaInfo);
cachedMetaInfo.suppressLookAhead = spill; // only suppress downstream lookaheads if this is a spilling splitter

Expand Down

0 comments on commit 2d4617c

Please sign in to comment.