From 6befbdafe96ee823e24085c4c2d2cedd116a824b Mon Sep 17 00:00:00 2001 From: Simon Walton Date: Fri, 17 May 2019 15:31:21 -0700 Subject: [PATCH] Logging for DomainList reception & timebox overruns --- libraries/networking/src/NodeList.cpp | 7 +++++++ libraries/networking/src/udt/Socket.cpp | 5 +++++ 2 files changed, 12 insertions(+) diff --git a/libraries/networking/src/NodeList.cpp b/libraries/networking/src/NodeList.cpp index 3a80745115..7d5a60c52b 100644 --- a/libraries/networking/src/NodeList.cpp +++ b/libraries/networking/src/NodeList.cpp @@ -622,6 +622,13 @@ void NodeList::processDomainServerList(QSharedPointer message) // refuse to process this packet if we aren't currently connected to the DS return; } +#ifdef DEBUG_EVENT_QUEUE + { + int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); + qCDebug(networking) << "DomainList received, pending count =" << _domainHandler.getCheckInPacketsSinceLastReply() + << "NodeList thread event queue size =" << nodeListQueueSize; + } +#endif // this is a packet from the domain server, reset the count of un-replied check-ins _domainHandler.clearPendingCheckins(); diff --git a/libraries/networking/src/udt/Socket.cpp b/libraries/networking/src/udt/Socket.cpp index 7829e3727c..2130d5bc6f 100644 --- a/libraries/networking/src/udt/Socket.cpp +++ b/libraries/networking/src/udt/Socket.cpp @@ -334,6 +334,11 @@ void Socket::readPendingDatagrams() { if (system_clock::now() > abortTime) { // We've been running for too long, stop processing packets for now // Once we've processed the event queue, we'll come back to packet processing +#ifdef DEBUG_EVENT_QUEUE + int nodeListQueueSize = ::hifi::qt::getEventQueueSize(thread()); + qCDebug(networking) << "Overran timebox by" << duration_cast(system_clock::now() - abortTime).count() + << "ms; NodeList thread event queue size =" << nodeListQueueSize; +#endif break; }