Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HPCC-29929 Remove some useless roxie metrics #17577

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 0 additions & 6 deletions roxie/ccd/ccd.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,6 @@ void setMulticastEndpoints(unsigned numChannels);
#define SUBCHANNEL_BITS 2 // allows for up to 7-way redundancy in a 16-bit short retries flag, high bits used for indicators/flags
#define MAX_SUBCHANNEL 7 // (16-2) / SUBCHANNEL_BITS

//#define TIME_PACKETS

#define ROXIE_FASTLANE 0x8000u // mask in retries indicating agent reply goes on the fast queue
#define ROXIE_BROADCAST 0x4000u // mask in retries indicating original request was a broadcast
#define ROXIE_RETRIES_MASK (~(ROXIE_FASTLANE|ROXIE_BROADCAST)) // retries bits mask
Expand Down Expand Up @@ -166,11 +164,7 @@ class RoxiePacketHeader
#ifdef SUBCHANNELS_IN_HEADER
ServerIdentifier subChannels[MAX_SUBCHANNEL];
#endif
#ifdef TIME_PACKETS
unsigned tick = 0;
#else
unsigned filler = 0; // keeps valgrind happy
#endif

RoxiePacketHeader() = default;

Expand Down
22 changes: 0 additions & 22 deletions roxie/ccd/ccdactivities.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -967,15 +967,13 @@ class CRoxieDiskReadBaseActivity : public CRoxieAgentActivity, implements IIndex
virtual IMessagePacker *process()
{
MTIME_SECTION(queryActiveTimer(), "CRoxieDiskReadBaseActivity::process");
diskReadStarted++;
Owned<IMessagePacker> output = ROQ->createOutputStream(packet->queryHeader(), false, logctx);
doProcess(output);
helper->setCallback(NULL);
if (aborted)
return NULL;
else
{
diskReadCompleted++;
return output.getClear();
}
}
Expand Down Expand Up @@ -1919,7 +1917,6 @@ class CParallelRoxieActivity : public CRoxieAgentActivity
else
{
MTIME_SECTION(queryActiveTimer(), "CParallelRoxieActivity::process");
diskReadStarted++;
Owned<IMessagePacker> output = ROQ->createOutputStream(packet->queryHeader(), false, logctx);
class casyncfor: public CAsyncFor
{
Expand Down Expand Up @@ -1955,7 +1952,6 @@ class CParallelRoxieActivity : public CRoxieAgentActivity
else
{
doProcess(output);
diskReadCompleted++;
return output.getClear();
}
}
Expand Down Expand Up @@ -2887,8 +2883,6 @@ class CRoxieIndexReadActivity : public CRoxieIndexActivity, implements IIndexRea
if (steppingRow)
rawSeek = steppingRow;
bool continuationNeeded = false;
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
ScopedAtomic<unsigned> postFiltered(::postFiltered);
while (!aborted && inputsDone < inputCount)
{
if (!resent || !steppingOffset) // Bit of a hack... In the resent case, we have already set up the tlk, and all keys are processed at once in the steppingOffset case (which makes checkPartChanged gives a false positive in this case)
Expand All @@ -2911,7 +2905,6 @@ class CRoxieIndexReadActivity : public CRoxieIndexActivity, implements IIndexRea
break;
}

indexRecordsRead++;
size32_t transformedSize;
const byte * keyRow = tlk->queryKeyBuffer();
int diff = 0;
Expand Down Expand Up @@ -2996,7 +2989,6 @@ class CRoxieIndexReadActivity : public CRoxieIndexActivity, implements IIndexRea
}
else
{
postFiltered++;
skipped++;
}
}
Expand Down Expand Up @@ -3155,8 +3147,6 @@ class CRoxieIndexNormalizeActivity : public CRoxieIndexActivity
unsigned skipped = 0;

unsigned processedBefore = processed;
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
ScopedAtomic<unsigned> postFiltered(::postFiltered);
bool continuationFailed = false;
while (!aborted && inputsDone < inputCount)
{
Expand All @@ -3178,7 +3168,6 @@ class CRoxieIndexNormalizeActivity : public CRoxieIndexActivity
break;
}

indexRecordsRead++;
bool firstMatch = normalizeHelper->first(tlk->queryKeyBuffer());
callback.finishedRow();
if (firstMatch) // first() can lookup blobs
Expand Down Expand Up @@ -3218,7 +3207,6 @@ class CRoxieIndexNormalizeActivity : public CRoxieIndexActivity
}
else
{
postFiltered++;
skipped++;
}
}
Expand Down Expand Up @@ -3305,7 +3293,6 @@ class CRoxieIndexCountActivity : public CRoxieIndexActivity
}

}
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
while (!aborted && inputsDone < inputCount && count < choosenLimit)
{
checkPartChanged(inputData[inputsDone]);
Expand All @@ -3319,7 +3306,6 @@ class CRoxieIndexCountActivity : public CRoxieIndexActivity
while (!aborted && (count < choosenLimit) && tlk->lookup(true))
{
keyprocessed++;
indexRecordsRead++;
count += countHelper->numValid(tlk->queryKeyBuffer());
if (count > rowLimit)
limitExceeded(false);
Expand Down Expand Up @@ -3428,7 +3414,6 @@ class CRoxieIndexAggregateActivity : public CRoxieIndexActivity
unsigned skipped = 0;

unsigned processedBefore = processed;
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
while (!aborted && inputsDone < inputCount)
{
checkPartChanged(inputData[inputsDone]);
Expand All @@ -3440,7 +3425,6 @@ class CRoxieIndexAggregateActivity : public CRoxieIndexActivity
while (!aborted && tlk->lookup(true))
{
keyprocessed++;
indexRecordsRead++;
aggregateHelper->processRow(rowBuilder, tlk->queryKeyBuffer());
callback.finishedRow();
}
Expand Down Expand Up @@ -3549,7 +3533,6 @@ class CRoxieIndexGroupAggregateActivity : public CRoxieIndexActivity, implements
Owned<IMessagePacker> output = ROQ->createOutputStream(packet->queryHeader(), false, logctx);

unsigned processedBefore = processed;
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
try
{
while (!aborted && inputsDone < inputCount)
Expand Down Expand Up @@ -3577,7 +3560,6 @@ class CRoxieIndexGroupAggregateActivity : public CRoxieIndexActivity, implements
else
{
keyprocessed++;
indexRecordsRead++;
aggregateHelper->processRow(tlk->queryKeyBuffer(), this);
callback.finishedRow();
}
Expand Down Expand Up @@ -4327,14 +4309,11 @@ IMessagePacker *CRoxieKeyedJoinIndexActivity::process()
else
tlk->reset(resent);
resent = false;
ScopedAtomic<unsigned> indexRecordsRead(::indexRecordsRead);
ScopedAtomic<unsigned> postFiltered(::postFiltered);
while (candidateCount <= atmost)
{
if (tlk->lookup(true))
{
candidateCount++;
indexRecordsRead++;
KLBlobProviderAdapter adapter(tlk, &logctx);
const byte *indexRow = tlk->queryKeyBuffer();
size_t fposOffset = tlk->queryRowSize() - sizeof(offset_t);
Expand Down Expand Up @@ -4385,7 +4364,6 @@ IMessagePacker *CRoxieKeyedJoinIndexActivity::process()
else
{
rejected++;
postFiltered++;
}
}
else
Expand Down
1 change: 0 additions & 1 deletion roxie/ccd/ccdcontext.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1011,7 +1011,6 @@ class RawDataReader : public WorkUnitRowReaderBase
size32_t size = rowDeserializer->deserialize(rowBuilder, rowSource);
if (isGrouped)
rowSource.read(sizeof(bool), &eogPending);
rowsIn++;
return rowBuilder.finalizeRowClear(size);
}
};
Expand Down
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
18 changes: 0 additions & 18 deletions roxie/ccd/ccdlistener.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,6 @@ class CascadeManager : public CInterface
if (doTrace(traceRoxieLock))
DBGLOG("globalLock released");
globalLock.signal();
globalSignals++;
}
}

Expand Down Expand Up @@ -284,7 +283,6 @@ class CascadeManager : public CInterface
DBGLOG("in getGlobalLock");
if (!globalLock.wait(2000)) // since all lock in the same order it's ok to block for a bit here
throw MakeStringException(ROXIE_LOCK_ERROR, "lock failed");
globalLocks++;
entered = true;
if (doTrace(traceRoxieLock))
DBGLOG("globalLock locked");
Expand All @@ -303,7 +301,6 @@ class CascadeManager : public CInterface
assertex(entered);
entered = false;
globalLock.signal();
globalSignals++;
if (doTrace(traceRoxieLock))
DBGLOG("globalLock released");
throw;
Expand Down Expand Up @@ -1140,13 +1137,6 @@ class RoxieWorkUnitWorker : public RoxieQueryWorker
{
void noteQuery(bool failed, unsigned elapsedTime, unsigned priority)
{
Owned <IJlibDateTime> now = createDateTimeNow();
unsigned y,mo,d,h,m,s,n;
now->getLocalTime(h, m, s, n);
now->getLocalDate(y, mo, d);
lastQueryTime = h*10000 + m * 100 + s;
lastQueryDate = y*10000 + mo * 100 + d;

switch(priority)
{
case 0: loQueryStats.noteQuery(failed, elapsedTime); break;
Expand Down Expand Up @@ -1247,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 @@ -1385,7 +1374,6 @@ class RoxieProtocolMsgContext : implements IHpccProtocolMsgContext, public CInte
{
ep.set(_ep);
unknownQueryStats.noteActive();
queryCount++;
}
~RoxieProtocolMsgContext()
{
Expand Down Expand Up @@ -1582,12 +1570,6 @@ class RoxieProtocolMsgContext : implements IHpccProtocolMsgContext, public CInte
}
void noteQueryStats(bool failed, unsigned elapsedTime)
{
Owned <IJlibDateTime> now = createDateTimeNow();
unsigned y,mo,d,h,m,s,n;
now->getLocalTime(h, m, s, n);
now->getLocalDate(y, mo, d);
lastQueryTime = h*10000 + m * 100 + s;
lastQueryDate = y*10000 + mo * 100 + d;
if (!notedActive)
{
unknownQueryStats.noteQuery(failed, elapsedTime);
Expand Down
Loading