Skip to content

Commit

Permalink
HPCC-32770 Soapcall stats for DNS, connect, num failures 2
Browse files Browse the repository at this point in the history
Signed-off-by: M Kelly <[email protected]>
  • Loading branch information
mckellyln committed Oct 6, 2024
1 parent 5ff1fe3 commit 3c7b6a2
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 11 deletions.
12 changes: 7 additions & 5 deletions common/thorhelper/thorsoapcall.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2474,8 +2474,9 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo
// TODO: for DNS, do we use timeoutMS or remainingMS or remainingMS / maxRetries+1 or ?
ep.set(connUrl.host.get(), connUrl.port, master->timeoutMS);

master->logctx.noteStatistic(StTimeSoapcallDNS, dnsTimer.elapsedNs());
master->activitySpanScope->setSpanAttribute("SoapcallDNSTimeMs", dnsTimer.elapsedMs());
unsigned __int64 dnsNs = dnsTimer.elapsedNs();
master->logctx.noteStatistic(StTimeSoapcallDNS, dnsNs);
master->activitySpanScope->setSpanAttribute("SoapcallDNSTimeNs", dnsNs);

if (ep.isNull())
throw MakeStringException(-1, "Failed to resolve host '%s'", nullText(connUrl.host.get()));
Expand Down Expand Up @@ -2529,14 +2530,15 @@ class CWSCAsyncFor : implements IWSCAsyncFor, public CInterface, public CAsyncFo
#endif
}

master->logctx.noteStatistic(StTimeSoapcallConn, connTimer.elapsedNs());
master->activitySpanScope->setSpanAttribute("SoapcallConnTimeMs", connTimer.elapsedMs());
unsigned __int64 connNs = connTimer.elapsedNs();
master->logctx.noteStatistic(StTimeSoapcallConnect, connNs);
master->activitySpanScope->setSpanAttribute("SoapcallConnectTimeNs", connNs);
}
break;
}
catch (IException *e)
{
master->logctx.noteStatistic(StNumSoapcallConnFailures, 1);
master->logctx.noteStatistic(StNumSoapcallConnectFailures, 1);

if (master->timeLimitExceeded)
{
Expand Down
4 changes: 2 additions & 2 deletions roxie/ccd/ccdserver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ static const StatisticsMapping indexStatistics({StNumServerCacheHits, StNumIndex
static const StatisticsMapping diskStatistics({StNumServerCacheHits, StNumDiskRowsRead, StNumDiskSeeks, StNumDiskAccepted,
StNumDiskRejected, StSizeAgentReply, StTimeAgentWait, StTimeAgentQueue, StTimeAgentProcess, StTimeIBYTIDelay, StNumAckRetries,
StSizeContinuationData, StNumContinuationRequests }, actStatistics);
static const StatisticsMapping soapStatistics({ StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConn, StNumSoapcallConnFailures }, actStatistics);
static const StatisticsMapping soapStatistics({ StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConnect, StNumSoapcallConnectFailures }, actStatistics);
static const StatisticsMapping groupStatistics({ StNumGroups, StNumGroupMax }, actStatistics);
static const StatisticsMapping sortStatistics({ StTimeSortElapsed }, actStatistics);
static const StatisticsMapping indexWriteStatistics({ StNumDuplicateKeys, StNumLeafCacheAdds, StNumNodeCacheAdds, StNumBlobCacheAdds }, actStatistics);
Expand All @@ -518,7 +518,7 @@ extern const StatisticsMapping accumulatedStatistics({StWhenFirstRow, StTimeLoca
StCycleBlobFetchCycles, StCycleLeafFetchCycles, StCycleNodeFetchCycles, StTimeBlobFetch, StTimeLeafFetch, StTimeNodeFetch,
StNumNodeDiskFetches, StNumLeafDiskFetches, StNumBlobDiskFetches,
StNumDiskRejected, StSizeAgentReply, StTimeAgentWait,
StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConn, StNumSoapcallConnFailures,
StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConnect, StNumSoapcallConnectFailures,
StNumGroups,
StTimeSortElapsed,
StNumDuplicateKeys,
Expand Down
6 changes: 3 additions & 3 deletions system/jlib/jstatcodes.h
Original file line number Diff line number Diff line change
Expand Up @@ -312,10 +312,10 @@ enum StatisticKind
StNumMatchCandidates,
StNumMatchCandidatesMax,
StTimeSoapcallDNS, // Time spent in DNS lookups for soapcalls
StTimeSoapcallConn, // Time spent in connect[+SSL_connect] for soapcalls
StTimeSoapcallConnect, // Time spent in connect[+SSL_connect] for soapcalls
StCycleSoapcallDNSCycles,
StCycleSoapcallConnCycles,
StNumSoapcallConnFailures,
StCycleSoapcallConnectCycles,
StNumSoapcallConnectFailures,
StMax,

//For any quantity there is potentially the following variants.
Expand Down
2 changes: 1 addition & 1 deletion thorlcr/thorutil/thormisc.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ static Owned<IMPtagAllocator> ClusterMPAllocator;
// stat. mappings shared between master and slave activities
const StatisticsMapping spillStatistics({StTimeSpillElapsed, StTimeSortElapsed, StNumSpills, StSizeSpillFile, StSizePeakTempDisk});
const StatisticsMapping executeStatistics({StTimeTotalExecute, StTimeLocalExecute, StTimeBlocked});
const StatisticsMapping soapcallStatistics({StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConn, StNumSoapcallConnFailures});
const StatisticsMapping soapcallStatistics({StTimeSoapcall, StTimeSoapcallDNS, StTimeSoapcallConnect, StNumSoapcallConnectFailures});
const StatisticsMapping basicActivityStatistics({}, executeStatistics, spillStatistics);
const StatisticsMapping groupActivityStatistics({StNumGroups, StNumGroupMax}, basicActivityStatistics);
const StatisticsMapping indexReadFileStatistics({}, diskReadRemoteStatistics, jhtreeCacheStatistics);
Expand Down

0 comments on commit 3c7b6a2

Please sign in to comment.