Input telemetry
All checks were successful
CI / React UI Build (push) Successful in 11s
CI / Native Windows Build And Tests (push) Successful in 2m56s
CI / Windows Release Package (push) Has been skipped

This commit is contained in:
Aiden
2026-05-12 21:13:22 +10:00
parent d72272b5a8
commit 5c66cfdc64
7 changed files with 86 additions and 0 deletions

View File

@@ -69,6 +69,10 @@ struct FakeRenderThreadMetrics
uint64_t shaderBuildFailures = 0;
uint64_t inputFramesReceived = 0;
uint64_t inputFramesDropped = 0;
uint64_t inputConsumeMisses = 0;
uint64_t inputUploadMisses = 0;
std::size_t inputReadyFrames = 0;
std::size_t inputReadingFrames = 0;
double inputLatestAgeMilliseconds = 0.0;
double inputUploadMilliseconds = 0.0;
bool inputFormatSupported = true;
@@ -104,6 +108,10 @@ void TestTelemetrySamplesCompletedPollMissesAndShaderCounts()
renderThread.metrics.shaderBuildFailures = 0;
renderThread.metrics.inputFramesReceived = 9;
renderThread.metrics.inputFramesDropped = 2;
renderThread.metrics.inputConsumeMisses = 3;
renderThread.metrics.inputUploadMisses = 4;
renderThread.metrics.inputReadyFrames = 1;
renderThread.metrics.inputReadingFrames = 0;
renderThread.metrics.inputLatestAgeMilliseconds = 4.5;
renderThread.metrics.inputUploadMilliseconds = 0.25;
renderThread.metrics.inputFormatSupported = true;
@@ -118,6 +126,10 @@ void TestTelemetrySamplesCompletedPollMissesAndShaderCounts()
Expect(snapshot.shaderBuildFailures == 0, "shader failure count is sampled");
Expect(snapshot.inputFramesReceived == 9, "input received count is sampled");
Expect(snapshot.inputFramesDropped == 2, "input dropped count is sampled");
Expect(snapshot.inputConsumeMisses == 3, "input consume miss count is sampled");
Expect(snapshot.inputUploadMisses == 4, "input upload miss count is sampled");
Expect(snapshot.inputReadyFrames == 1, "input ready frame count is sampled");
Expect(snapshot.inputReadingFrames == 0, "input reading frame count is sampled");
Expect(snapshot.inputLatestAgeMilliseconds == 4.5, "input latest age is sampled");
Expect(snapshot.inputUploadMilliseconds == 0.25, "input upload timing is sampled");
Expect(snapshot.inputFormatSupported, "input format support is sampled");
@@ -168,6 +180,10 @@ void TestTelemetrySerializesToJson()
snapshot.shaderBuildFailures = 0;
snapshot.inputFramesReceived = 10;
snapshot.inputFramesDropped = 1;
snapshot.inputConsumeMisses = 2;
snapshot.inputUploadMisses = 3;
snapshot.inputReadyFrames = 1;
snapshot.inputReadingFrames = 0;
snapshot.inputLatestAgeMilliseconds = 3.5;
snapshot.inputUploadMilliseconds = 0.75;
snapshot.inputFormatSupported = true;
@@ -192,6 +208,8 @@ void TestTelemetrySerializesToJson()
"\"completions\":117,\"late\":1,\"dropped\":2,"
"\"shaderCommitted\":1,\"shaderFailures\":0,"
"\"inputFramesReceived\":10,\"inputFramesDropped\":1,"
"\"inputConsumeMisses\":2,\"inputUploadMisses\":3,"
"\"inputReadyFrames\":1,\"inputReadingFrames\":0,"
"\"inputLatestAgeMs\":3.5,\"inputUploadMs\":0.75,"
"\"inputFormatSupported\":true,\"inputSignalPresent\":true,"
"\"inputCaptureFps\":59.94,\"inputConvertMs\":4.25,"