Bläddra i källkod

Merge pull request #10108 from ghalliday/issue17760

HPCC-17760 Prevent scheduled workunits createing duplicate elapsed stats

Reviewed-By: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 8 år sedan
förälder
incheckning
a5dda32fa4
1 ändrade filer med 3 tillägg och 1 borttagningar
  1. 3 1
      roxie/ccd/ccdcontext.cpp

+ 3 - 1
roxie/ccd/ccdcontext.cpp

@@ -3020,7 +3020,9 @@ public:
             CRuntimeStatisticCollection merged(allStatistics);
             logctx.gatherStats(merged);
             merged.recordStatistics(*gatherer);
-            gatherer->addStatistic(StTimeElapsed, elapsedTimer.elapsedNs());
+
+            //MORE: If executed more than once (e.g., scheduled), then TimeElapsed isn't particularly correct.
+            gatherer->updateStatistic(StTimeElapsed, elapsedTimer.elapsedNs(), StatsMergeReplace);
 
             WuStatisticTarget statsTarget(w, "roxie");
             rowManager->reportPeakStatistics(statsTarget, 0);