mirror of
https://github.com/overte-org/overte.git
synced 2025-08-09 08:49:05 +02:00
Merge pull request #9302 from jherico/expose_dropped_count
Expose dropped frames count to stats UI
This commit is contained in:
commit
f9ca41e89c
3 changed files with 9 additions and 0 deletions
|
@ -79,6 +79,10 @@ Item {
|
||||||
StatText {
|
StatText {
|
||||||
text: "Avatar Simrate: " + root.avatarSimrate
|
text: "Avatar Simrate: " + root.avatarSimrate
|
||||||
}
|
}
|
||||||
|
StatText {
|
||||||
|
text: "Missed Frame Count: " + root.appdropped;
|
||||||
|
visible: root.appdropped > 0;
|
||||||
|
}
|
||||||
StatText {
|
StatText {
|
||||||
text: "Packets In/Out: " + root.packetInCount + "/" + root.packetOutCount
|
text: "Packets In/Out: " + root.packetInCount + "/" + root.packetOutCount
|
||||||
}
|
}
|
||||||
|
|
|
@ -125,6 +125,8 @@ void Stats::updateStats(bool force) {
|
||||||
STAT_UPDATE(framerate, qApp->getFps());
|
STAT_UPDATE(framerate, qApp->getFps());
|
||||||
if (qApp->getActiveDisplayPlugin()) {
|
if (qApp->getActiveDisplayPlugin()) {
|
||||||
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
auto displayPlugin = qApp->getActiveDisplayPlugin();
|
||||||
|
auto stats = displayPlugin->getHardwareStats();
|
||||||
|
STAT_UPDATE(appdropped, stats["app_dropped_frame_count"].toInt());
|
||||||
STAT_UPDATE(renderrate, displayPlugin->renderRate());
|
STAT_UPDATE(renderrate, displayPlugin->renderRate());
|
||||||
STAT_UPDATE(presentrate, displayPlugin->presentRate());
|
STAT_UPDATE(presentrate, displayPlugin->presentRate());
|
||||||
STAT_UPDATE(presentnewrate, displayPlugin->newFramePresentRate());
|
STAT_UPDATE(presentnewrate, displayPlugin->newFramePresentRate());
|
||||||
|
|
|
@ -39,6 +39,8 @@ class Stats : public QQuickItem {
|
||||||
// How often the display device reprojecting old frames
|
// How often the display device reprojecting old frames
|
||||||
STATS_PROPERTY(float, stutterrate, 0)
|
STATS_PROPERTY(float, stutterrate, 0)
|
||||||
|
|
||||||
|
STATS_PROPERTY(int, appdropped, 0)
|
||||||
|
|
||||||
STATS_PROPERTY(float, presentnewrate, 0)
|
STATS_PROPERTY(float, presentnewrate, 0)
|
||||||
STATS_PROPERTY(float, presentdroprate, 0)
|
STATS_PROPERTY(float, presentdroprate, 0)
|
||||||
STATS_PROPERTY(int, simrate, 0)
|
STATS_PROPERTY(int, simrate, 0)
|
||||||
|
@ -135,6 +137,7 @@ public slots:
|
||||||
void forceUpdateStats() { updateStats(true); }
|
void forceUpdateStats() { updateStats(true); }
|
||||||
|
|
||||||
signals:
|
signals:
|
||||||
|
void appdroppedChanged();
|
||||||
void framerateChanged();
|
void framerateChanged();
|
||||||
void expandedChanged();
|
void expandedChanged();
|
||||||
void timingExpandedChanged();
|
void timingExpandedChanged();
|
||||||
|
|
Loading…
Reference in a new issue