From 2f53ee1f760794771f65513ddaaa0927089b2bfe Mon Sep 17 00:00:00 2001 From: Shamser Ahmed Date: Fri, 1 Nov 2024 15:00:46 +0000 Subject: [PATCH] HPCC-32928 Capture and report start timings for stranded activities Signed-off-by: Shamser Ahmed --- thorlcr/graph/thgraphslave.cpp | 3 ++- thorlcr/graph/thgraphslave.hpp | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/thorlcr/graph/thgraphslave.cpp b/thorlcr/graph/thgraphslave.cpp index 7e31640b07d..f11dcdda8e1 100644 --- a/thorlcr/graph/thgraphslave.cpp +++ b/thorlcr/graph/thgraphslave.cpp @@ -732,6 +732,7 @@ void CThorStrandedActivity::strandedStop() //For some reason gcc doesn't let you specify a function as pure virtual and define it at the same time. void CThorStrandedActivity::start() { + SimpleActivityTimer t(startCycles, timeActivities); CSlaveActivity::start(); startJunction(splitter); onStartStrands(); @@ -855,7 +856,7 @@ IStrandJunction *CThorStrandedActivity::getOutputStreams(CActivityBase &ctx, uns unsigned __int64 CThorStrandedActivity::queryTotalCycles() const { - unsigned __int64 total = 0;; + unsigned __int64 total = startCycles; ForEachItemIn(i, strands) { CThorStrandProcessor &strand = strands.item(i); diff --git a/thorlcr/graph/thgraphslave.hpp b/thorlcr/graph/thgraphslave.hpp index 685784ddc86..a990d47782a 100644 --- a/thorlcr/graph/thgraphslave.hpp +++ b/thorlcr/graph/thgraphslave.hpp @@ -481,6 +481,7 @@ class graphslave_decl CThorStrandedActivity : public CSlaveActivity Owned splitter; Owned sourceJunction; // A junction applied to the output of a source activity std::atomic active; + stat_type startCycles = 0; protected: void onStartStrands(); public: