Selaa lähdekoodia

HPCC-12430 Remove Roxie traceActivityTimes option

Was not documented or useful

Signed-off-by: Richard Chapman <rchapman@hpccsystems.com>
Richard Chapman 10 vuotta sitten
vanhempi
commit
8da3d1d154

+ 0 - 2
common/thorhelper/roxiehelper.ipp

@@ -57,8 +57,6 @@ enum TracingCategory
 {
     LOG_TRACING,
     LOG_ERROR,
-    LOG_TIMING,
-    LOG_STATISTICS,
     LOG_STATVALUES,
 };
 

+ 0 - 3
roxie/ccd/ccd.hpp

@@ -511,8 +511,6 @@ public:
         {
         case LOG_TRACING: return "TRACE";
         case LOG_ERROR: return "ERROR";
-        case LOG_TIMING: return "TIMING";
-        case LOG_STATISTICS: return "STATISTICS";
         case LOG_STATVALUES: return "STATVALUES";
         default: return "UNKNOWN";
         }
@@ -787,7 +785,6 @@ class SlaveContextLogger : public StringContextLogger
 {
     Owned<IMessagePacker> output;
     bool anyOutput;
-    bool traceActivityTimes;
     bool debuggerActive;
     bool checkingHeap;
     IpAddress ip;

+ 1 - 1
roxie/ccd/ccdactivities.cpp

@@ -102,7 +102,7 @@ CActivityFactory::CActivityFactory(unsigned _id, unsigned _subgraphId, IQueryFac
     queryFactory(_queryFactory),
     helperFactory(_helperFactory),
     kind(_kind),
-    mystats(allStatistics)
+    mystats(allStatistics)  // We COULD cut down this list but it would complicate the structure, and we do actually track more in the factory than in the activity
 {
     if (helperFactory)
     {

+ 1 - 12
roxie/ccd/ccdcontext.cpp

@@ -1210,16 +1210,8 @@ public:
         return logctx.queryTraceLevel();
     }
 
-    virtual void noteProcessed(const IRoxieContextLogger &activityContext, const IRoxieServerActivity *activity, unsigned _idx, unsigned _processed, const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const
+    virtual void noteProcessed(const IRoxieServerActivity *activity, unsigned _idx, unsigned _processed, const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const
     {
-        if (options.traceActivityTimes)
-        {
-            StringBuffer text, prefix;
-            text.appendf("%s outputIdx %d processed %d total %d us local %d us",
-                getActivityText(activity->getKind()), _idx, _processed, (unsigned) (cycle_to_nanosec(_totalCycles.totalCycles)/1000), (unsigned)(cycle_to_nanosec(_localCycles)/1000));
-            activityContext.getLogPrefix(prefix);
-            CTXLOGa(LOG_TIMING, prefix.str(), text.str());
-        }
         if (graphStats)
         {
             IStatisticGatherer & builder = graphStats->queryStatsBuilder();
@@ -2691,9 +2683,6 @@ public:
         rowManager->setMemoryLimit(options.memoryLimit);
         authToken.append(httpHelper.queryAuthToken());
         workflow.setown(_factory->createWorkflowMachine(workUnit, false, logctx));
-
-        if (options.traceActivityTimes)
-            options.timeActivities = true;
     }
 
     virtual roxiemem::IRowManager &queryRowManager()

+ 1 - 1
roxie/ccd/ccdcontext.hpp

@@ -58,7 +58,7 @@ interface IRoxieSlaveContext : extends IRoxieContextLogger
     virtual IRoxieWriteHandler *createLFN(const char *filename, bool overwrite, bool extend, const StringArray &clusters) = 0;
     virtual void onFileCallback(const RoxiePacketHeader &header, const char *lfn, bool isOpt, bool isLocal) = 0;
     virtual IActivityGraph * getLibraryGraph(const LibraryCallFactoryExtra &extra, IRoxieServerActivity *parentActivity) = 0;
-    virtual void noteProcessed(const IRoxieContextLogger &_activityContext, const IRoxieServerActivity *activity, unsigned _idx, unsigned _processed,  const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const = 0;
+    virtual void noteProcessed(const IRoxieServerActivity *activity, unsigned _idx, unsigned _processed,  const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const = 0;
     virtual IProbeManager *queryProbeManager() const = 0;
     virtual IDebuggableContext *queryDebugContext() const = 0;
     virtual void printResults(IXmlWriter *output, const char *name, unsigned sequence) = 0;

+ 1 - 5
roxie/ccd/ccdquery.cpp

@@ -288,7 +288,6 @@ QueryOptions::QueryOptions()
     enableFieldTranslation = fieldTranslationEnabled;
     skipFileFormatCrcCheck = false;
     stripWhitespaceFromStoredDataset = ((ptr_ignoreWhiteSpace & defaultXmlReadFlags) != 0);
-    traceActivityTimes = false;   // No global default for this
     timeActivities = defaultTimeActivities;
 }
 
@@ -313,7 +312,6 @@ QueryOptions::QueryOptions(const QueryOptions &other)
     skipFileFormatCrcCheck = other.skipFileFormatCrcCheck;
     stripWhitespaceFromStoredDataset = other.stripWhitespaceFromStoredDataset;
     timeActivities =other.timeActivities;
-    traceActivityTimes = other.traceActivityTimes;
 }
 
 void QueryOptions::setFromWorkUnit(IConstWorkUnit &wu, const IPropertyTree *stateInfo)
@@ -347,7 +345,6 @@ void QueryOptions::setFromWorkUnit(IConstWorkUnit &wu, const IPropertyTree *stat
     updateFromWorkUnit(skipFileFormatCrcCheck, wu, "skipFileFormatCrcCheck");
     updateFromWorkUnit(stripWhitespaceFromStoredDataset, wu, "stripWhitespaceFromStoredDataset");
     updateFromWorkUnit(timeActivities, wu, "timeActivities");
-    updateFromWorkUnit(traceActivityTimes, wu, "traceActivityTimes");
 }
 
 void QueryOptions::updateFromWorkUnitM(memsize_t &value, IConstWorkUnit &wu, const char *name)
@@ -391,7 +388,6 @@ void QueryOptions::setFromContext(const IPropertyTree *ctx)
         updateFromContext(skipFileFormatCrcCheck, ctx, "_SkipFileFormatCrcCheck", "@skipFileFormatCrcCheck");
         updateFromContext(stripWhitespaceFromStoredDataset, ctx, "_StripWhitespaceFromStoredDataset", "@stripWhitespaceFromStoredDataset");
         updateFromContext(timeActivities, ctx, "@timeActivities", "_TimeActivities");
-        updateFromContext(traceActivityTimes, ctx, "@timing", "_TraceActivityTimes");
     }
 }
 
@@ -437,7 +433,7 @@ void QueryOptions::setFromSlaveLoggingFlags(unsigned loggingFlags)
 {
     // MORE - priority/timelimit ?
     checkingHeap = (loggingFlags & LOGGING_CHECKINGHEAP) != 0;
-    traceActivityTimes = (loggingFlags & LOGGING_TIMEACTIVITIES) != 0;
+    timeActivities = (loggingFlags & LOGGING_TIMEACTIVITIES) != 0;
 }
 
 //----------------------------------------------------------------------------------------------

+ 0 - 1
roxie/ccd/ccdquery.hpp

@@ -114,7 +114,6 @@ public:
     bool skipFileFormatCrcCheck;
     bool stripWhitespaceFromStoredDataset;
     bool timeActivities;
-    bool traceActivityTimes;
 
 private:
     static const char *findProp(const IPropertyTree *ctx, const char *name1, const char *name2);

+ 0 - 3
roxie/ccd/ccdqueue.cpp

@@ -466,7 +466,6 @@ void SlaveContextLogger::set(IRoxieQueryPacket *packet)
     intercept = false;
     debuggerActive = false;
     checkingHeap = false;
-    traceActivityTimes = false;
     stats.reset();
     start = msTick();
     if (packet)
@@ -487,8 +486,6 @@ void SlaveContextLogger::set(IRoxieQueryPacket *packet)
                 ctxTraceLevel = (*traceInfo++ - 1); // avoid null byte here in case anyone still thinks there's just a null-terminated string
                 traceLength--;
             }
-            if (loggingFlags & LOGGING_TIMEACTIVITIES)
-                traceActivityTimes = true;
             if (loggingFlags & LOGGING_BLIND)
                 blind = true;
             if (loggingFlags & LOGGING_CHECKINGHEAP)

+ 4 - 11
roxie/ccd/ccdserver.cpp

@@ -314,9 +314,9 @@ public:
     {
         return ctx->getLibraryGraph(extra, parentActivity);
     }
-    virtual void noteProcessed(const IRoxieContextLogger &_activityContext, const IRoxieServerActivity *_activity, unsigned _idx, unsigned _processed,  const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const
+    virtual void noteProcessed(const IRoxieServerActivity *_activity, unsigned _idx, unsigned _processed,  const ActivityTimeAccumulator &_totalCycles, unsigned __int64 _localCycles) const
     {
-        ctx->noteProcessed(_activityContext, _activity, _idx, _processed, _totalCycles, _localCycles);
+        ctx->noteProcessed(_activity, _idx, _processed, _totalCycles, _localCycles);
     }
     virtual IProbeManager *queryProbeManager() const
     {
@@ -971,7 +971,7 @@ public:
         }
         if (ctx)
         {
-            ctx->noteProcessed(*this, this, 0, processed, totalCycles, localCycles);
+            ctx->noteProcessed(this, 0, processed, totalCycles, localCycles);
             ctx->mergeStats(stats);
         }
         basehelper.Release();
@@ -1253,13 +1253,6 @@ public:
                         CTXLOG("STATE: activity %d reset without stop", activityId);
                     stop(false);
                 }
-                if (ctx->queryOptions().traceActivityTimes)
-                {
-                    StringBuffer prefix, text;
-                    getLogPrefix(prefix);
-                    stats.toStr(text);
-                    CTXLOGa(LOG_STATISTICS, prefix.str(), text.str());
-                }
                 state = STATEreset;
 #ifdef TRACE_STARTSTOP
                 if (traceStartStop)
@@ -3423,7 +3416,7 @@ private:
                 const QueryOptions &options = ctx->queryOptions();
                 if (activity.queryLogCtx().isIntercepted())
                     loggingFlags |= LOGGING_INTERCEPTED;
-                if (options.traceActivityTimes)
+                if (options.timeActivities)
                     loggingFlags |= LOGGING_TIMEACTIVITIES; 
                 if (activity.queryLogCtx().isBlind())
                     loggingFlags |= LOGGING_BLIND;