mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 03:24:00 +02:00
Avatar Hero debugging & logging
This commit is contained in:
parent
4c071be2bf
commit
08d6a2ce7f
5 changed files with 23 additions and 1 deletions
|
@ -752,6 +752,7 @@ void AvatarMixer::sendStatsPacket() {
|
|||
slavesAggregatObject["sent_4_averageDataBytes"] = TIGHT_LOOP_STAT(aggregateStats.numDataBytesSent);
|
||||
slavesAggregatObject["sent_5_averageTraitsBytes"] = TIGHT_LOOP_STAT(aggregateStats.numTraitsBytesSent);
|
||||
slavesAggregatObject["sent_6_averageIdentityBytes"] = TIGHT_LOOP_STAT(aggregateStats.numIdentityBytesSent);
|
||||
slavesAggregatObject["sent_7_averageHeroAvatars"] = TIGHT_LOOP_STAT(aggregateStats.numHeroesIncluded);
|
||||
|
||||
slavesAggregatObject["timing_1_processIncomingPackets"] = TIGHT_LOOP_STAT_UINT64(aggregateStats.processIncomingPacketsElapsedTime);
|
||||
slavesAggregatObject["timing_2_ignoreCalculation"] = TIGHT_LOOP_STAT_UINT64(aggregateStats.ignoreCalculationElapsedTime);
|
||||
|
|
|
@ -19,6 +19,8 @@
|
|||
#include <EntityTree.h>
|
||||
#include <ZoneEntityItem.h>
|
||||
|
||||
#include "AvatarLogging.h"
|
||||
|
||||
#include "AvatarMixerSlave.h"
|
||||
|
||||
AvatarMixerClientData::AvatarMixerClientData(const QUuid& nodeID, Node::LocalID nodeLocalID) :
|
||||
|
@ -132,10 +134,21 @@ int AvatarMixerClientData::parseData(ReceivedMessage& message, const SlaveShared
|
|||
|
||||
auto newPosition = getPosition();
|
||||
if (newPosition != oldPosition) {
|
||||
//#define AVATAR_HERO_TEST_HACK
|
||||
#ifdef AVATAR_HERO_TEST_HACK
|
||||
{
|
||||
const static QString heroKey { "HERO" };
|
||||
_avatar->setPriorityAvatar(_avatar->getDisplayName().contains(heroKey));
|
||||
}
|
||||
#else
|
||||
EntityTree& entityTree = *slaveSharedData.entityTree;
|
||||
FindPriorityZone findPriorityZone { newPosition, false } ;
|
||||
entityTree.recurseTreeWithOperation(&FindPriorityZone::operation, &findPriorityZone);
|
||||
_avatar->setPriorityAvatar(findPriorityZone.isInPriorityZone);
|
||||
if (findPriorityZone.isInPriorityZone) {
|
||||
qCWarning(avatars) << "Avatar" << _avatar->getDisplayName() << "in hero zone";
|
||||
}
|
||||
#endif
|
||||
}
|
||||
|
||||
return true;
|
||||
|
|
|
@ -596,6 +596,9 @@ void AvatarMixerSlave::broadcastAvatarDataToAgent(const SharedNodePointer& node)
|
|||
|
||||
if (detail != AvatarData::NoData) {
|
||||
_stats.numOthersIncluded++;
|
||||
if (otherAvatar->getPriorityAvatar()) {
|
||||
_stats.numHeroesIncluded++;
|
||||
}
|
||||
|
||||
// increment the number of avatars sent to this receiver
|
||||
nodeData->incrementNumAvatarsSentLastFrame();
|
||||
|
|
|
@ -32,6 +32,7 @@ public:
|
|||
int numIdentityPacketsSent { 0 };
|
||||
int numOthersIncluded { 0 };
|
||||
int overBudgetAvatars { 0 };
|
||||
int numHeroesIncluded { 0 };
|
||||
|
||||
quint64 ignoreCalculationElapsedTime { 0 };
|
||||
quint64 avatarDataPackingElapsedTime { 0 };
|
||||
|
@ -57,6 +58,7 @@ public:
|
|||
numIdentityPacketsSent = 0;
|
||||
numOthersIncluded = 0;
|
||||
overBudgetAvatars = 0;
|
||||
numHeroesIncluded = 0;
|
||||
|
||||
ignoreCalculationElapsedTime = 0;
|
||||
avatarDataPackingElapsedTime = 0;
|
||||
|
@ -80,6 +82,7 @@ public:
|
|||
numIdentityPacketsSent += rhs.numIdentityPacketsSent;
|
||||
numOthersIncluded += rhs.numOthersIncluded;
|
||||
overBudgetAvatars += rhs.overBudgetAvatars;
|
||||
numHeroesIncluded += rhs.numHeroesIncluded;
|
||||
|
||||
ignoreCalculationElapsedTime += rhs.ignoreCalculationElapsedTime;
|
||||
avatarDataPackingElapsedTime += rhs.avatarDataPackingElapsedTime;
|
||||
|
|
|
@ -123,7 +123,9 @@ void ThreadedAssignment::checkInWithDomainServerOrExit() {
|
|||
|
||||
// increase the number of queued check ins
|
||||
_numQueuedCheckIns++;
|
||||
qCDebug(networking) << "Number of queued checkins = " << _numQueuedCheckIns;
|
||||
if (_numQueuedCheckIns > 1) {
|
||||
qCDebug(networking) << "Number of queued checkins = " << _numQueuedCheckIns;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue