mirror of
https://github.com/JulianGro/overte.git
synced 2025-04-17 22:08:27 +02:00
more debugging
This commit is contained in:
parent
5b7ab1e49a
commit
dc7e2dbe1b
2 changed files with 28 additions and 1 deletions
|
@ -205,11 +205,16 @@ void OctreeServer::trackProcessWaitTime(float time) {
|
|||
}
|
||||
|
||||
void OctreeServer::attachQueryNodeToNode(Node* newNode) {
|
||||
quint64 start = usecTimestampNow();
|
||||
if (!newNode->getLinkedData() && _instance) {
|
||||
OctreeQueryNode* newQueryNodeData = _instance->createOctreeQueryNode();
|
||||
newQueryNodeData->init();
|
||||
newNode->setLinkedData(newQueryNodeData);
|
||||
}
|
||||
quint64 end = usecTimestampNow();
|
||||
if (end - start > 1000) {
|
||||
qDebug() << "OctreeServer::attachQueryNodeToNode() took:" << (end - start);
|
||||
}
|
||||
}
|
||||
|
||||
OctreeServer::OctreeServer(const QByteArray& packet) :
|
||||
|
@ -243,6 +248,21 @@ OctreeServer::OctreeServer(const QByteArray& packet) :
|
|||
|
||||
_averageLoopTime.updateAverage(0);
|
||||
qDebug() << "Octree server starting... [" << this << "]";
|
||||
|
||||
|
||||
QTimer* timer = new QTimer(this);
|
||||
connect(timer, SIGNAL(timeout()), SLOT(doNothing()));
|
||||
timer->start(0);
|
||||
|
||||
}
|
||||
|
||||
quint64 lastNothing = usecTimestampNow();
|
||||
void OctreeServer::doNothing() {
|
||||
quint64 now = usecTimestampNow();
|
||||
if (now - lastNothing > 100) {
|
||||
qDebug() << "since last doNothing:" << (now - lastNothing);
|
||||
}
|
||||
lastNothing = now;
|
||||
}
|
||||
|
||||
OctreeServer::~OctreeServer() {
|
||||
|
@ -1275,9 +1295,13 @@ QString OctreeServer::getStatusLink() {
|
|||
}
|
||||
|
||||
void OctreeServer::sendStatsPacket() {
|
||||
|
||||
quint64 start = usecTimestampNow();
|
||||
static QJsonObject statsObject1;
|
||||
ThreadedAssignment::addPacketStatsAndSendStatsPacket(statsObject1);
|
||||
quint64 end = usecTimestampNow();
|
||||
if (end - start > 1000) {
|
||||
qDebug() << "OctreeServer::sendStatsPacket() took:" << (end - start);
|
||||
}
|
||||
|
||||
/**
|
||||
// TODO: we have too many stats to fit in a single MTU... so for now, we break it into multiple JSON objects and
|
||||
|
|
|
@ -923,8 +923,11 @@ void NodeList::resetPacketStats() {
|
|||
_packetStatTimer.restart();
|
||||
}
|
||||
|
||||
quint64 lastSilentNodesStart = usecTimestampNow();
|
||||
void NodeList::removeSilentNodes() {
|
||||
quint64 removeSilentNodesStart = usecTimestampNow();
|
||||
qDebug() << "since last removeSilentNodes()..." << (lastSilentNodesStart - removeSilentNodesStart);
|
||||
lastSilentNodesStart = removeSilentNodesStart;
|
||||
|
||||
_nodeHashMutex.lock();
|
||||
|
||||
|
|
Loading…
Reference in a new issue