Skip to content

Commit

Permalink
HPCC-29929 Remove some more useless roxie metrics
Browse files Browse the repository at this point in the history
A few more that I left on first pass in case they were useful. They are not.

Signed-off-by: Richard Chapman <[email protected]>
  • Loading branch information
richardkchapman committed Jul 11, 2023
1 parent c3db836 commit 7ca3c0a
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 33 deletions.
4 changes: 0 additions & 4 deletions roxie/ccd/ccdfile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1516,7 +1516,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
{
next.setown(popped);
}
numFilesToProcess--; // must decrement counter for SNMP accuracy
}
}
if (next)
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -1841,7 +1839,6 @@ class CRoxieFileCache : implements IRoxieFileCache, implements ICopyFileProgress
}

todo.append(*ret);
numFilesToProcess++; // must increment counter for SNMP accuracy
toCopy.signal();
}
else
Expand Down Expand Up @@ -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

Expand Down
2 changes: 0 additions & 2 deletions roxie/ccd/ccdlistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1237,7 +1237,6 @@ class RoxieWorkUnitWorker : public RoxieQueryWorker
unsigned priority = (unsigned) -2;
try
{
queryCount++;
bool isBlind = wu->getDebugValueBool("blindLogging", false);
if (pool)
{
Expand Down Expand Up @@ -1375,7 +1374,6 @@ class RoxieProtocolMsgContext : implements IHpccProtocolMsgContext, public CInte
{
ep.set(_ep);
unknownQueryStats.noteActive();
queryCount++;
}
~RoxieProtocolMsgContext()
{
Expand Down
6 changes: 0 additions & 6 deletions roxie/ccd/ccdqueue.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand All @@ -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());
Expand Down Expand Up @@ -1785,7 +1780,6 @@ class CRoxieWorker : public CInterface, implements IPooledThread
#endif
logctx.set(NULL);
}
agentsActive--;
}
}
catch(IException *E)
Expand Down
14 changes: 0 additions & 14 deletions roxie/ccd/ccdsnmp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,20 +31,12 @@

#define DEFAULT_PULSE_INTERVAL 30

RelaxedAtomic<unsigned> queryCount;
RoxieQueryStats unknownQueryStats;
RoxieQueryStats loQueryStats;
RoxieQueryStats hiQueryStats;
RoxieQueryStats slaQueryStats;
RoxieQueryStats combinedQueryStats;

RelaxedAtomic<unsigned> numFilesToProcess;
RelaxedAtomic<unsigned> queueLength;
RelaxedAtomic<unsigned> maxQueueLength;

RelaxedAtomic<unsigned> agentsActive;
RelaxedAtomic<unsigned> maxAgentsActive;

#define addMetric(a, b) doAddMetric(a, #a, b)

interface INamedMetric : extends IInterface
Expand Down Expand Up @@ -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);
Expand Down Expand Up @@ -335,8 +323,6 @@ CRoxieMetricsManager::CRoxieMetricsManager()
addMetric(flowRequestsSent, 1000);
addMetric(flowPermitsReceived, 1000);
addMetric(dataPacketsSent, 1000);

addMetric(numFilesToProcess, 0);
ticker.start();
}

Expand Down
7 changes: 0 additions & 7 deletions roxie/ccd/ccdsnmp.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -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<unsigned> queryCount;
extern RoxieQueryStats unknownQueryStats;
extern RoxieQueryStats loQueryStats;
extern RoxieQueryStats hiQueryStats;
extern RoxieQueryStats slaQueryStats;
extern RoxieQueryStats combinedQueryStats;

extern RelaxedAtomic<unsigned> maxAgentsActive;
extern RelaxedAtomic<unsigned> agentsActive;
extern RelaxedAtomic<unsigned> queueLength;
extern RelaxedAtomic<unsigned> maxQueueLength;
extern RelaxedAtomic<unsigned> numFilesToProcess;

interface IRoxieMetricsManager : extends IInterface
{
virtual void dumpMetrics() = 0;
Expand Down

0 comments on commit 7ca3c0a

Please sign in to comment.