mirror of
https://github.com/overte-org/overte.git
synced 2025-08-04 04:23:33 +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) {
|
void OctreeServer::attachQueryNodeToNode(Node* newNode) {
|
||||||
|
quint64 start = usecTimestampNow();
|
||||||
if (!newNode->getLinkedData() && _instance) {
|
if (!newNode->getLinkedData() && _instance) {
|
||||||
OctreeQueryNode* newQueryNodeData = _instance->createOctreeQueryNode();
|
OctreeQueryNode* newQueryNodeData = _instance->createOctreeQueryNode();
|
||||||
newQueryNodeData->init();
|
newQueryNodeData->init();
|
||||||
newNode->setLinkedData(newQueryNodeData);
|
newNode->setLinkedData(newQueryNodeData);
|
||||||
}
|
}
|
||||||
|
quint64 end = usecTimestampNow();
|
||||||
|
if (end - start > 1000) {
|
||||||
|
qDebug() << "OctreeServer::attachQueryNodeToNode() took:" << (end - start);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
OctreeServer::OctreeServer(const QByteArray& packet) :
|
OctreeServer::OctreeServer(const QByteArray& packet) :
|
||||||
|
@ -243,6 +248,21 @@ OctreeServer::OctreeServer(const QByteArray& packet) :
|
||||||
|
|
||||||
_averageLoopTime.updateAverage(0);
|
_averageLoopTime.updateAverage(0);
|
||||||
qDebug() << "Octree server starting... [" << this << "]";
|
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() {
|
OctreeServer::~OctreeServer() {
|
||||||
|
@ -1275,9 +1295,13 @@ QString OctreeServer::getStatusLink() {
|
||||||
}
|
}
|
||||||
|
|
||||||
void OctreeServer::sendStatsPacket() {
|
void OctreeServer::sendStatsPacket() {
|
||||||
|
quint64 start = usecTimestampNow();
|
||||||
static QJsonObject statsObject1;
|
static QJsonObject statsObject1;
|
||||||
ThreadedAssignment::addPacketStatsAndSendStatsPacket(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
|
// 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();
|
_packetStatTimer.restart();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
quint64 lastSilentNodesStart = usecTimestampNow();
|
||||||
void NodeList::removeSilentNodes() {
|
void NodeList::removeSilentNodes() {
|
||||||
quint64 removeSilentNodesStart = usecTimestampNow();
|
quint64 removeSilentNodesStart = usecTimestampNow();
|
||||||
|
qDebug() << "since last removeSilentNodes()..." << (lastSilentNodesStart - removeSilentNodesStart);
|
||||||
|
lastSilentNodesStart = removeSilentNodesStart;
|
||||||
|
|
||||||
_nodeHashMutex.lock();
|
_nodeHashMutex.lock();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue