Improvement
This commit is contained in:
@@ -313,6 +313,40 @@ bool HealthTelemetry::TryRecordOutputRenderQueueWait(double queueWaitMillisecond
|
||||
return true;
|
||||
}
|
||||
|
||||
void HealthTelemetry::RecordSystemMemoryPlayoutStats(std::size_t freeFrameCount, std::size_t readyFrameCount,
|
||||
std::size_t scheduledFrameCount, uint64_t underrunCount, uint64_t repeatCount, uint64_t dropCount,
|
||||
double frameAgeAtScheduleMilliseconds, double frameAgeAtCompletionMilliseconds)
|
||||
{
|
||||
std::lock_guard<std::mutex> lock(mMutex);
|
||||
mBackendPlayout.systemFramePoolFree = freeFrameCount;
|
||||
mBackendPlayout.systemFramePoolReady = readyFrameCount;
|
||||
mBackendPlayout.systemFramePoolScheduled = scheduledFrameCount;
|
||||
mBackendPlayout.systemFrameUnderrunCount = underrunCount;
|
||||
mBackendPlayout.systemFrameRepeatCount = repeatCount;
|
||||
mBackendPlayout.systemFrameDropCount = dropCount;
|
||||
mBackendPlayout.systemFrameAgeAtScheduleMilliseconds = std::max(frameAgeAtScheduleMilliseconds, 0.0);
|
||||
mBackendPlayout.systemFrameAgeAtCompletionMilliseconds = std::max(frameAgeAtCompletionMilliseconds, 0.0);
|
||||
}
|
||||
|
||||
bool HealthTelemetry::TryRecordSystemMemoryPlayoutStats(std::size_t freeFrameCount, std::size_t readyFrameCount,
|
||||
std::size_t scheduledFrameCount, uint64_t underrunCount, uint64_t repeatCount, uint64_t dropCount,
|
||||
double frameAgeAtScheduleMilliseconds, double frameAgeAtCompletionMilliseconds)
|
||||
{
|
||||
std::unique_lock<std::mutex> lock(mMutex, std::try_to_lock);
|
||||
if (!lock.owns_lock())
|
||||
return false;
|
||||
|
||||
mBackendPlayout.systemFramePoolFree = freeFrameCount;
|
||||
mBackendPlayout.systemFramePoolReady = readyFrameCount;
|
||||
mBackendPlayout.systemFramePoolScheduled = scheduledFrameCount;
|
||||
mBackendPlayout.systemFrameUnderrunCount = underrunCount;
|
||||
mBackendPlayout.systemFrameRepeatCount = repeatCount;
|
||||
mBackendPlayout.systemFrameDropCount = dropCount;
|
||||
mBackendPlayout.systemFrameAgeAtScheduleMilliseconds = std::max(frameAgeAtScheduleMilliseconds, 0.0);
|
||||
mBackendPlayout.systemFrameAgeAtCompletionMilliseconds = std::max(frameAgeAtCompletionMilliseconds, 0.0);
|
||||
return true;
|
||||
}
|
||||
|
||||
void HealthTelemetry::RecordOutputRenderPipelineTiming(
|
||||
double drawMilliseconds,
|
||||
double fenceWaitMilliseconds,
|
||||
|
||||
Reference in New Issue
Block a user