Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-33094 Add WhenFirstRow and TimeElapsed statistics to Thor activities #19345

Merged
merged 1 commit into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions common/thorhelper/thorcommon.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1801,6 +1801,8 @@ void ActivityTimeAccumulator::addStatistics(IStatisticGatherer & builder) const
if (blockedCycles)
builder.addStatistic(StTimeBlocked, cycle_to_nanosec(blockedCycles));
}
if (lookAheadCycles)
builder.addStatistic(StTimeLookAhead, (unsigned __int64)cycle_to_nanosec(lookAheadCycles));
}

void ActivityTimeAccumulator::addStatistics(CRuntimeStatisticCollection & merged) const
Expand All @@ -1814,6 +1816,8 @@ void ActivityTimeAccumulator::addStatistics(CRuntimeStatisticCollection & merged
if (blockedCycles)
merged.mergeStatistic(StTimeBlocked, cycle_to_nanosec(blockedCycles));
}
if (lookAheadCycles)
merged.mergeStatistic(StTimeLookAhead, (unsigned __int64)cycle_to_nanosec(lookAheadCycles));
}

void ActivityTimeAccumulator::merge(const ActivityTimeAccumulator & other)
Expand Down
5 changes: 1 addition & 4 deletions thorlcr/graph/thgraphslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -620,10 +620,7 @@ void CSlaveActivity::serializeStats(MemoryBuffer &mb)

// JCS->GH - should these be serialized as cycles, and a different mapping used on master?
serializedStats.setStatistic(StTimeLocalExecute, (unsigned __int64)cycle_to_nanosec(queryLocalCycles()));
serializedStats.setStatistic(StTimeTotalExecute, (unsigned __int64)cycle_to_nanosec(queryTotalCycles()));
serializedStats.setStatistic(StTimeBlocked, (unsigned __int64)cycle_to_nanosec(queryBlockedCycles()));
serializedStats.setStatistic(StTimeLookAhead, (unsigned __int64)cycle_to_nanosec(queryLookAheadCycles()));

slaveTimerStats.addStatistics(serializedStats);
serializedStats.serialize(mb);
ForEachItemIn(i, outputs)
{
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/thorutil/thormisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,7 @@ static Owned<IMPtagAllocator> ClusterMPAllocator;

// stat. mappings shared between master and slave activities
const StatisticsMapping spillStatistics({StTimeSpillElapsed, StTimeSortElapsed, StNumSpills, StSizeSpillFile, StSizePeakTempDisk});
const StatisticsMapping executeStatistics({StTimeTotalExecute, StTimeLocalExecute, StTimeBlocked});
const StatisticsMapping executeStatistics({StWhenFirstRow, StTimeElapsed, StTimeTotalExecute, StTimeLocalExecute, StTimeBlocked});
const StatisticsMapping soapcallStatistics({StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConnect, StNumSoapcallConnectFailures});
const StatisticsMapping basicActivityStatistics({StNumParallelExecute, StTimeLookAhead}, executeStatistics, spillStatistics);
const StatisticsMapping groupActivityStatistics({StNumGroups, StNumGroupMax}, basicActivityStatistics);
Expand Down
Loading