From 7ca3c0a504910fb758430602351688aa8113d027 Mon Sep 17 00:00:00 2001 From: Richard Chapman Date: Tue, 11 Jul 2023 12:14:19 +0100 Subject: [PATCH] HPCC-29929 Remove some more useless roxie metrics A few more that I left on first pass in case they were useful. They are not. Signed-off-by: Richard Chapman --- roxie/ccd/ccdfile.cpp | 4 ---- roxie/ccd/ccdlistener.cpp | 2 -- roxie/ccd/ccdqueue.cpp | 6 ------ roxie/ccd/ccdsnmp.cpp | 14 -------------- roxie/ccd/ccdsnmp.hpp | 7 ------- 5 files changed, 33 deletions(-) diff --git a/roxie/ccd/ccdfile.cpp b/roxie/ccd/ccdfile.cpp index 1d917c5b49e..d7762aafc86 100644 --- a/roxie/ccd/ccdfile.cpp +++ b/roxie/ccd/ccdfile.cpp @@ -1516,7 +1516,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress { next.setown(popped); } - numFilesToProcess--; // must decrement counter for SNMP accuracy } } if (next) @@ -1712,7 +1711,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress if (file == &todo.item(idx)) { todo.remove(idx); - numFilesToProcess--; // must decrement counter for SNMP accuracy } } #ifdef _CONTAINERIZED @@ -1841,7 +1839,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress } todo.append(*ret); - numFilesToProcess++; // must increment counter for SNMP accuracy toCopy.signal(); } else @@ -1871,7 +1868,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress todo.add(*ret, 0); else todo.append(*ret); - numFilesToProcess++; // must increment counter for SNMP accuracy toCopy.signal(); #endif diff --git a/roxie/ccd/ccdlistener.cpp b/roxie/ccd/ccdlistener.cpp index c15731f29d7..27b10f94cd6 100644 --- a/roxie/ccd/ccdlistener.cpp +++ b/roxie/ccd/ccdlistener.cpp @@ -1237,7 +1237,6 @@ class RoxieWorkUnitWorker : public RoxieQueryWorker unsigned priority = (unsigned) -2; try { - queryCount++; bool isBlind = wu->getDebugValueBool("blindLogging", false); if (pool) { @@ -1375,7 +1374,6 @@ class RoxieProtocolMsgContext : implements IHpccProtocolMsgContext, public CInte { ep.set(_ep); unknownQueryStats.noteActive(); - queryCount++; } ~RoxieProtocolMsgContext() { diff --git a/roxie/ccd/ccdqueue.cpp b/roxie/ccd/ccdqueue.cpp index b3732328099..5c32b2f0181 100644 --- a/roxie/ccd/ccdqueue.cpp +++ b/roxie/ccd/ccdqueue.cpp @@ -1138,7 +1138,6 @@ class RoxieQueue : public CInterface, implements IThreadFactory void noteQueued() { - maxQueueLength.store_max(++queueLength); // NOTE - there is a small race condition here - if idle is 1 but two enqueue's happen // close enough together that the signal has not yet caused idle to come back down to zero, then the // desired new thread may not be created. It's unlikely, and it's benign in that the query is still @@ -1291,7 +1290,6 @@ class RoxieQueue : public CInterface, implements IThreadFactory l.CTXLOG("discarded %s", header.toString(xx).str()); #endif found->Release(); - queueLength--; return true; } else @@ -1729,8 +1727,6 @@ class CRoxieWorker : public CInterface, implements IPooledThread queue->wait(); if (stopped) break; - agentsActive++; - maxAgentsActive.store_max(agentsActive); abortLaunch = false; workerThreadBusy = true; #ifndef NEW_IBYTI @@ -1747,7 +1743,6 @@ class CRoxieWorker : public CInterface, implements IPooledThread #endif packet.setown(next->deserialize()); next.clear(); - queueLength--; RoxiePacketHeader &header = packet->queryHeader(); #ifndef SUBCHANNELS_IN_HEADER topology.setown(getTopology()); @@ -1785,7 +1780,6 @@ class CRoxieWorker : public CInterface, implements IPooledThread #endif logctx.set(NULL); } - agentsActive--; } } catch(IException *E) diff --git a/roxie/ccd/ccdsnmp.cpp b/roxie/ccd/ccdsnmp.cpp index c99998a6fe6..9b670be5afa 100644 --- a/roxie/ccd/ccdsnmp.cpp +++ b/roxie/ccd/ccdsnmp.cpp @@ -31,20 +31,12 @@ #define DEFAULT_PULSE_INTERVAL 30 -RelaxedAtomic queryCount; RoxieQueryStats unknownQueryStats; RoxieQueryStats loQueryStats; RoxieQueryStats hiQueryStats; RoxieQueryStats slaQueryStats; RoxieQueryStats combinedQueryStats; -RelaxedAtomic numFilesToProcess; -RelaxedAtomic queueLength; -RelaxedAtomic maxQueueLength; - -RelaxedAtomic agentsActive; -RelaxedAtomic maxAgentsActive; - #define addMetric(a, b) doAddMetric(a, #a, b) interface INamedMetric : extends IInterface @@ -296,15 +288,11 @@ using roxiemem::getDataBuffersActive; CRoxieMetricsManager::CRoxieMetricsManager() { started = false; - addMetric(maxQueueLength, 0); - addMetric(queryCount, 1000); unknownQueryStats.addMetrics(this, "unknown", 1000); loQueryStats.addMetrics(this, "lo", 1000); hiQueryStats.addMetrics(this, "hi", 1000); slaQueryStats.addMetrics(this, "sla", 1000); combinedQueryStats.addMetrics(this, "all", 1000); - addMetric(agentsActive, 0); - addMetric(maxAgentsActive, 0); addMetric(restarts, 0); addMetric(nodesLoaded, 1000); @@ -335,8 +323,6 @@ CRoxieMetricsManager::CRoxieMetricsManager() addMetric(flowRequestsSent, 1000); addMetric(flowPermitsReceived, 1000); addMetric(dataPacketsSent, 1000); - - addMetric(numFilesToProcess, 0); ticker.start(); } diff --git a/roxie/ccd/ccdsnmp.hpp b/roxie/ccd/ccdsnmp.hpp index aa111b9c6de..81ffaaa9ede 100644 --- a/roxie/ccd/ccdsnmp.hpp +++ b/roxie/ccd/ccdsnmp.hpp @@ -78,19 +78,12 @@ extern IQueryStatsAggregator *createQueryStatsAggregator(const char *queryName, extern IPropertyTree *getAllQueryStats(bool includeQueries, bool rawStats, time_t from, time_t to); extern IPropertyTree *getQueryRawStats(const char *queryID, time_t from, time_t to); -extern RelaxedAtomic queryCount; extern RoxieQueryStats unknownQueryStats; extern RoxieQueryStats loQueryStats; extern RoxieQueryStats hiQueryStats; extern RoxieQueryStats slaQueryStats; extern RoxieQueryStats combinedQueryStats; -extern RelaxedAtomic maxAgentsActive; -extern RelaxedAtomic agentsActive; -extern RelaxedAtomic queueLength; -extern RelaxedAtomic maxQueueLength; -extern RelaxedAtomic numFilesToProcess; - interface IRoxieMetricsManager : extends IInterface { virtual void dumpMetrics() = 0;