diff --git a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp index 59997c87a34..617c1be3271 100644 --- a/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp +++ b/thorlcr/activities/keyedjoin/thkeyedjoinslave.cpp @@ -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; } diff --git a/thorlcr/slave/slavmain.cpp b/thorlcr/slave/slavmain.cpp index 80f730d83cf..83cf9b82cc7 100644 --- a/thorlcr/slave/slavmain.cpp +++ b/thorlcr/slave/slavmain.cpp @@ -771,14 +771,9 @@ class CKJService : public CSimpleInterfaceOf, 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());