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-31407 Serialize all contextLogger stats (via a CRuntimeStatsCollection) from remote key lookup #18436

Merged
merged 1 commit into from
Mar 27, 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
13 changes: 3 additions & 10 deletions thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1765,17 +1765,10 @@ class CKeyedJoinSlave : public CSlaveActivity, implements IJoinProcessor, implem
}
joinGroup->decPending(); // Every queued lookup row triggered an inc., this is the corresponding dec.
}
unsigned __int64 seeks, scans, wildseeks;
unsigned __int64 nodeDiskFetches, leafDiskFetches, blobDiskFetches;
mb.read(seeks).read(scans).read(wildseeks);
mb.read(nodeDiskFetches).read(leafDiskFetches).read(blobDiskFetches);
CRuntimeStatisticCollection statsDelta(jhtreeCacheStatistics);
statsDelta.deserialize(mb);
CStatsContextLogger * contextLogger(contextLoggers[selected]);
contextLogger->noteStatistic(StNumIndexSeeks, seeks);
contextLogger->noteStatistic(StNumIndexScans, scans);
contextLogger->noteStatistic(StNumIndexWildSeeks, wildseeks);
contextLogger->noteStatistic(StNumNodeDiskFetches, nodeDiskFetches);
contextLogger->noteStatistic(StNumLeafDiskFetches, leafDiskFetches);
contextLogger->noteStatistic(StNumBlobDiskFetches, blobDiskFetches);
contextLogger->mergeStats(statsDelta);
if (received == numRows)
break;
}
Expand Down
11 changes: 3 additions & 8 deletions thorlcr/slave/slavmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -771,14 +771,9 @@ class CKJService : public CSimpleInterfaceOf<IKJService>, implements IThreaded,
{
countMarker.write(rowNum-rowStart);

CRuntimeStatisticCollection deltaStats(startStats.queryMapping());
contextLogger.updateStatsDeltaTo(deltaStats, startStats);
replyMb.append(deltaStats.getStatisticValue(StNumIndexSeeks));
replyMb.append(deltaStats.getStatisticValue(StNumIndexScans));
replyMb.append(deltaStats.getStatisticValue(StNumIndexWildSeeks));
replyMb.append(deltaStats.getStatisticValue(StNumNodeDiskFetches));
replyMb.append(deltaStats.getStatisticValue(StNumLeafDiskFetches));
replyMb.append(deltaStats.getStatisticValue(StNumBlobDiskFetches));
CRuntimeStatisticCollection statsDelta(startStats.queryMapping());
contextLogger.updateStatsDeltaTo(statsDelta, startStats);
statsDelta.serialize(replyMb);
if (activityCtx->useMessageCompression())
{
fastLZCompressToBuffer(replyMsg, tmpMB.length(), tmpMB.toByteArray());
Expand Down