Phase 7 done
This commit is contained in:
@@ -76,6 +76,77 @@ void TestPersistenceWriteHealth()
|
||||
Expect(persistence.lastWriteSucceeded, "persistence health records successful write state");
|
||||
Expect(!persistence.unsavedChanges, "persistence health clears unsaved changes after latest successful write with no pending request");
|
||||
}
|
||||
|
||||
void TestBackendPlayoutHealth()
|
||||
{
|
||||
HealthTelemetry telemetry;
|
||||
telemetry.RecordBackendPlayoutHealth(
|
||||
"Degraded",
|
||||
"Dropped",
|
||||
1,
|
||||
4,
|
||||
12,
|
||||
10,
|
||||
2,
|
||||
1,
|
||||
8,
|
||||
11,
|
||||
3,
|
||||
2,
|
||||
2,
|
||||
1,
|
||||
2,
|
||||
5,
|
||||
3,
|
||||
1,
|
||||
true,
|
||||
"Output underrun");
|
||||
|
||||
const HealthTelemetry::BackendPlayoutSnapshot playout = telemetry.GetBackendPlayoutSnapshot();
|
||||
Expect(playout.lifecycleState == "Degraded", "backend playout health stores lifecycle state");
|
||||
Expect(playout.completionResult == "Dropped", "backend playout health stores completion result");
|
||||
Expect(playout.readyQueueDepth == 1, "backend playout health stores ready queue depth");
|
||||
Expect(playout.readyQueueCapacity == 4, "backend playout health stores ready queue capacity");
|
||||
Expect(playout.readyQueueDroppedCount == 2, "backend playout health stores queue dropped count");
|
||||
Expect(playout.readyQueueUnderrunCount == 1, "backend playout health stores queue underrun count");
|
||||
Expect(playout.completedFrameIndex == 8, "backend playout health stores completed index");
|
||||
Expect(playout.scheduledFrameIndex == 11, "backend playout health stores scheduled index");
|
||||
Expect(playout.measuredLagFrames == 2, "backend playout health stores measured lag");
|
||||
Expect(playout.catchUpFrames == 2, "backend playout health stores catch-up frames");
|
||||
Expect(playout.lateStreak == 1, "backend playout health stores late streak");
|
||||
Expect(playout.dropStreak == 2, "backend playout health stores drop streak");
|
||||
Expect(playout.lateFrameCount == 5, "backend playout health stores late frame count");
|
||||
Expect(playout.droppedFrameCount == 3, "backend playout health stores dropped frame count");
|
||||
Expect(playout.flushedFrameCount == 1, "backend playout health stores flushed frame count");
|
||||
Expect(playout.degraded, "backend playout health stores degraded state");
|
||||
Expect(playout.statusMessage == "Output underrun", "backend playout health stores status message");
|
||||
|
||||
Expect(telemetry.TryRecordBackendPlayoutHealth(
|
||||
"Running",
|
||||
"Completed",
|
||||
2,
|
||||
4,
|
||||
13,
|
||||
11,
|
||||
2,
|
||||
1,
|
||||
9,
|
||||
12,
|
||||
3,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
0,
|
||||
5,
|
||||
3,
|
||||
1,
|
||||
false,
|
||||
""),
|
||||
"try backend playout health succeeds when uncontended");
|
||||
const HealthTelemetry::Snapshot snapshot = telemetry.GetSnapshot();
|
||||
Expect(snapshot.backendPlayout.lifecycleState == "Running", "full health snapshot includes backend playout state");
|
||||
Expect(!snapshot.backendPlayout.degraded, "full health snapshot includes backend degraded state");
|
||||
}
|
||||
}
|
||||
|
||||
int main()
|
||||
@@ -84,6 +155,7 @@ int main()
|
||||
TestRuntimeEventDispatchStats();
|
||||
TestRuntimeEventTryRecord();
|
||||
TestPersistenceWriteHealth();
|
||||
TestBackendPlayoutHealth();
|
||||
|
||||
if (gFailures != 0)
|
||||
{
|
||||
|
||||
@@ -92,10 +92,14 @@ public:
|
||||
return true;
|
||||
}
|
||||
|
||||
void AccountForCompletionResult(VideoIOCompletionResult result, uint64_t readyQueueDepth) override
|
||||
VideoPlayoutRecoveryDecision AccountForCompletionResult(VideoIOCompletionResult result, uint64_t readyQueueDepth) override
|
||||
{
|
||||
mLastCompletion = result;
|
||||
mLastReadyQueueDepth = readyQueueDepth;
|
||||
VideoPlayoutRecoveryDecision decision;
|
||||
decision.result = result;
|
||||
decision.readyQueueDepth = readyQueueDepth;
|
||||
return decision;
|
||||
}
|
||||
|
||||
unsigned ScheduledFrames() const { return mScheduledFrames; }
|
||||
|
||||
Reference in New Issue
Block a user