mirror of
https://github.com/overte-org/overte.git
synced 2025-04-20 11:45:36 +02:00
add some various debug and stats code to avatarMixer
This commit is contained in:
parent
b48ff6f24f
commit
e642f6f96a
2 changed files with 7 additions and 0 deletions
|
@ -159,6 +159,7 @@ void AvatarMixer::start() {
|
|||
//auto eventsTimer = _eventsTiming.timer();
|
||||
|
||||
// since we're a while loop we need to yield to qt's event processing
|
||||
auto start = usecTimestampNow();
|
||||
QCoreApplication::processEvents();
|
||||
|
||||
if (_isFinished) {
|
||||
|
@ -166,6 +167,8 @@ void AvatarMixer::start() {
|
|||
QCoreApplication::sendPostedEvents(this, QEvent::DeferredDelete);
|
||||
break;
|
||||
}
|
||||
auto end = usecTimestampNow();
|
||||
_processEventsElapsedTime += (end - start);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -804,6 +807,8 @@ void AvatarMixer::sendStatsPacket() {
|
|||
statsObject["timing_average_z_handleRadiusIgnoreRequestPacket"] = (float)_handleRadiusIgnoreRequestPacketElapsedTime / (float)_numStatFrames;
|
||||
statsObject["timing_average_z_handleRequestsDomainListDataPacket"] = (float)_handleRequestsDomainListDataPacketElapsedTime / (float)_numStatFrames;
|
||||
|
||||
statsObject["timing_average_z_processEvents"] = (float)_processEventsElapsedTime / (float)_numStatFrames;
|
||||
|
||||
_handleViewFrustumPacketElapsedTime = 0;
|
||||
_handleAvatarDataPacketElapsedTime = 0;
|
||||
_handleAvatarIdentityPacketElapsedTime = 0;
|
||||
|
@ -811,6 +816,7 @@ void AvatarMixer::sendStatsPacket() {
|
|||
_handleNodeIgnoreRequestPacketElapsedTime = 0;
|
||||
_handleRadiusIgnoreRequestPacketElapsedTime = 0;
|
||||
_handleRequestsDomainListDataPacketElapsedTime = 0;
|
||||
_processEventsElapsedTime = 0;
|
||||
|
||||
|
||||
QJsonObject avatarsObject;
|
||||
|
|
|
@ -90,6 +90,7 @@ private:
|
|||
quint64 _handleRadiusIgnoreRequestPacketElapsedTime { 0 };
|
||||
quint64 _handleRequestsDomainListDataPacketElapsedTime { 0 };
|
||||
|
||||
quint64 _processEventsElapsedTime { 0 };
|
||||
|
||||
RateCounter<> _loopRate; // this is the rate that the main thread tight loop runs
|
||||
|
||||
|
|
Loading…
Reference in a new issue