mirror of
https://github.com/gnif/LookingGlass.git
synced 2026-08-09 00:31:31 +00:00
[idd] scheduler: report actual acquired frame rate
Derive the source rate from unique frames observed over the actual log interval. The old EWMA discarded intervals below 2 ms, capping the reported rate at 500 Hz and understating high-rate sources.
This commit is contained in:
@@ -709,15 +709,18 @@ void CFrameScheduler::LogStatistics(uint64_t now)
|
||||
return;
|
||||
}
|
||||
|
||||
const uint64_t elapsed = now - m_lastLog;
|
||||
const uint64_t acquired = m_acquiredFrames - m_lastLogAcquired;
|
||||
const uint64_t skipped = m_skippedFrames - m_lastLogSkipped;
|
||||
const uint64_t published = m_publishedFrames - m_lastLogPublished;
|
||||
DEBUG_TRACE("Frame schedule owner %u: %.3f Hz client, %.3f Hz guest, "
|
||||
const double acquiredRate =
|
||||
static_cast<double>(acquired) * 1000000000.0 / elapsed;
|
||||
DEBUG_TRACE("Frame schedule owner %u: %.3f Hz client, %.3f Hz acquired, "
|
||||
"%.3f ms work, %.3f ms phase; %llu acquired, %llu skipped, "
|
||||
"%llu published",
|
||||
m_schedule.clientID,
|
||||
1000000000.0 / m_schedule.period,
|
||||
m_guestPeriod ? 1000000000.0 / m_guestPeriod : 0.0,
|
||||
acquiredRate,
|
||||
m_workEstimate / 1000000.0,
|
||||
m_lastPhaseError / 1000000.0,
|
||||
static_cast<unsigned long long>(acquired),
|
||||
|
||||
Reference in New Issue
Block a user