Phase 7 done
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m47s
CI / Windows Release Package (push) Successful in 3m2s

This commit is contained in:
Aiden
2026-05-11 21:15:51 +10:00
parent f288455709
commit 0a7954e879
12 changed files with 289 additions and 27 deletions

View File

@@ -207,6 +207,72 @@ bool HealthTelemetry::TryRecordPersistenceWriteResult(bool succeeded, const std:
return true;
}
void HealthTelemetry::RecordBackendPlayoutHealth(const std::string& lifecycleState, const std::string& completionResult,
std::size_t readyQueueDepth, std::size_t readyQueueCapacity, uint64_t readyQueuePushedCount,
uint64_t readyQueuePoppedCount, uint64_t readyQueueDroppedCount, uint64_t readyQueueUnderrunCount,
uint64_t completedFrameIndex, uint64_t scheduledFrameIndex, uint64_t scheduledLeadFrames,
uint64_t measuredLagFrames, uint64_t catchUpFrames, uint64_t lateStreak, uint64_t dropStreak,
uint64_t lateFrameCount, uint64_t droppedFrameCount, uint64_t flushedFrameCount,
bool degraded, const std::string& statusMessage)
{
std::lock_guard<std::mutex> lock(mMutex);
mBackendPlayout.lifecycleState = lifecycleState;
mBackendPlayout.completionResult = completionResult;
mBackendPlayout.readyQueueDepth = readyQueueDepth;
mBackendPlayout.readyQueueCapacity = readyQueueCapacity;
mBackendPlayout.readyQueuePushedCount = readyQueuePushedCount;
mBackendPlayout.readyQueuePoppedCount = readyQueuePoppedCount;
mBackendPlayout.readyQueueDroppedCount = readyQueueDroppedCount;
mBackendPlayout.readyQueueUnderrunCount = readyQueueUnderrunCount;
mBackendPlayout.completedFrameIndex = completedFrameIndex;
mBackendPlayout.scheduledFrameIndex = scheduledFrameIndex;
mBackendPlayout.scheduledLeadFrames = scheduledLeadFrames;
mBackendPlayout.measuredLagFrames = measuredLagFrames;
mBackendPlayout.catchUpFrames = catchUpFrames;
mBackendPlayout.lateStreak = lateStreak;
mBackendPlayout.dropStreak = dropStreak;
mBackendPlayout.lateFrameCount = lateFrameCount;
mBackendPlayout.droppedFrameCount = droppedFrameCount;
mBackendPlayout.flushedFrameCount = flushedFrameCount;
mBackendPlayout.degraded = degraded;
mBackendPlayout.statusMessage = statusMessage;
}
bool HealthTelemetry::TryRecordBackendPlayoutHealth(const std::string& lifecycleState, const std::string& completionResult,
std::size_t readyQueueDepth, std::size_t readyQueueCapacity, uint64_t readyQueuePushedCount,
uint64_t readyQueuePoppedCount, uint64_t readyQueueDroppedCount, uint64_t readyQueueUnderrunCount,
uint64_t completedFrameIndex, uint64_t scheduledFrameIndex, uint64_t scheduledLeadFrames,
uint64_t measuredLagFrames, uint64_t catchUpFrames, uint64_t lateStreak, uint64_t dropStreak,
uint64_t lateFrameCount, uint64_t droppedFrameCount, uint64_t flushedFrameCount,
bool degraded, const std::string& statusMessage)
{
std::unique_lock<std::mutex> lock(mMutex, std::try_to_lock);
if (!lock.owns_lock())
return false;
mBackendPlayout.lifecycleState = lifecycleState;
mBackendPlayout.completionResult = completionResult;
mBackendPlayout.readyQueueDepth = readyQueueDepth;
mBackendPlayout.readyQueueCapacity = readyQueueCapacity;
mBackendPlayout.readyQueuePushedCount = readyQueuePushedCount;
mBackendPlayout.readyQueuePoppedCount = readyQueuePoppedCount;
mBackendPlayout.readyQueueDroppedCount = readyQueueDroppedCount;
mBackendPlayout.readyQueueUnderrunCount = readyQueueUnderrunCount;
mBackendPlayout.completedFrameIndex = completedFrameIndex;
mBackendPlayout.scheduledFrameIndex = scheduledFrameIndex;
mBackendPlayout.scheduledLeadFrames = scheduledLeadFrames;
mBackendPlayout.measuredLagFrames = measuredLagFrames;
mBackendPlayout.catchUpFrames = catchUpFrames;
mBackendPlayout.lateStreak = lateStreak;
mBackendPlayout.dropStreak = dropStreak;
mBackendPlayout.lateFrameCount = lateFrameCount;
mBackendPlayout.droppedFrameCount = droppedFrameCount;
mBackendPlayout.flushedFrameCount = flushedFrameCount;
mBackendPlayout.degraded = degraded;
mBackendPlayout.statusMessage = statusMessage;
return true;
}
HealthTelemetry::SignalStatusSnapshot HealthTelemetry::GetSignalStatusSnapshot() const
{
std::lock_guard<std::mutex> lock(mMutex);
@@ -237,6 +303,12 @@ HealthTelemetry::PersistenceSnapshot HealthTelemetry::GetPersistenceSnapshot() c
return mPersistence;
}
HealthTelemetry::BackendPlayoutSnapshot HealthTelemetry::GetBackendPlayoutSnapshot() const
{
std::lock_guard<std::mutex> lock(mMutex);
return mBackendPlayout;
}
HealthTelemetry::Snapshot HealthTelemetry::GetSnapshot() const
{
std::lock_guard<std::mutex> lock(mMutex);
@@ -247,5 +319,6 @@ HealthTelemetry::Snapshot HealthTelemetry::GetSnapshot() const
snapshot.performance = mPerformance;
snapshot.runtimeEvents = mRuntimeEvents;
snapshot.persistence = mPersistence;
snapshot.backendPlayout = mBackendPlayout;
return snapshot;
}