Skip to content

Commit

Permalink
HPCC-31407 Serialize all contextLogger stats (via a CRuntimeStatsColl…
Browse files Browse the repository at this point in the history
…ection) from remote key lookup

Signed-off-by: Shamser Ahmed <[email protected]>
  • Loading branch information
shamser committed Mar 22, 2024
1 parent 8535dce commit 4a69725
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 18 deletions.
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

0 comments on commit 4a69725

Please sign in to comment.