Start up settle

This commit is contained in:
Aiden
2026-05-12 22:04:46 +10:00
parent 3a83d9617f
commit 13586c611a
12 changed files with 62 additions and 2 deletions

View File

@@ -1,5 +1,6 @@
#include "AppConfigProvider.h"
#include <chrono>
#include <filesystem>
#include <fstream>
#include <iostream>
@@ -36,6 +37,7 @@ std::filesystem::path WriteConfigFixture()
<< " \"autoReload\": false,\n"
<< " \"maxTemporalHistoryFrames\": 8,\n"
<< " \"previewFps\": 24,\n"
<< " \"startupSettleMs\": 2500,\n"
<< " \"enableExternalKeying\": true\n"
<< "}\n";
return path;
@@ -66,6 +68,7 @@ void TestLoadsRuntimeHostConfig()
Expect(!config.autoReload, "auto reload loads");
Expect(config.maxTemporalHistoryFrames == 8, "history length loads");
Expect(config.previewFps == 24.0, "preview fps loads");
Expect(config.startupSettle == std::chrono::milliseconds(2500), "startup settle loads");
Expect(config.deckLink.externalKeyingEnabled, "external keying loads");
std::filesystem::remove(path);

View File

@@ -65,6 +65,8 @@ struct FakeOutput
struct FakeRenderThreadMetrics
{
uint64_t clockOverruns = 0;
uint64_t skippedFrames = 0;
uint64_t shaderBuildsCommitted = 0;
uint64_t shaderBuildFailures = 0;
uint64_t inputFramesReceived = 0;
@@ -104,6 +106,8 @@ void TestTelemetrySamplesCompletedPollMissesAndShaderCounts()
outputThread.metrics.scheduleFailures = 0;
FakeRenderThread renderThread;
renderThread.metrics.clockOverruns = 5;
renderThread.metrics.skippedFrames = 8;
renderThread.metrics.shaderBuildsCommitted = 1;
renderThread.metrics.shaderBuildFailures = 0;
renderThread.metrics.inputFramesReceived = 9;
@@ -122,6 +126,8 @@ void TestTelemetrySamplesCompletedPollMissesAndShaderCounts()
Expect(snapshot.completedFrames == 1, "completed frame count is sampled");
Expect(snapshot.scheduledFrames == 4, "scheduled frame count is sampled");
Expect(snapshot.completedPollMisses == 12, "completed poll misses are sampled");
Expect(snapshot.clockOverruns == 5, "clock overrun count is sampled");
Expect(snapshot.clockSkippedFrames == 8, "clock skipped frame count is sampled");
Expect(snapshot.shaderBuildsCommitted == 1, "shader committed count is sampled");
Expect(snapshot.shaderBuildFailures == 0, "shader failure count is sampled");
Expect(snapshot.inputFramesReceived == 9, "input received count is sampled");
@@ -176,6 +182,8 @@ void TestTelemetrySerializesToJson()
snapshot.completions = 117;
snapshot.displayedLate = 1;
snapshot.dropped = 2;
snapshot.clockOverruns = 3;
snapshot.clockSkippedFrames = 5;
snapshot.shaderBuildsCommitted = 1;
snapshot.shaderBuildFailures = 0;
snapshot.inputFramesReceived = 10;
@@ -206,6 +214,8 @@ void TestTelemetrySerializesToJson()
"\"renderedTotal\":120,\"scheduledTotal\":118,"
"\"completedPollMisses\":3,\"scheduleFailures\":0,"
"\"completions\":117,\"late\":1,\"dropped\":2,"
"\"clockOverruns\":3,\"clockSkippedFrames\":5,"
"\"clockOveruns\":3,\"clockSkipped\":5,"
"\"shaderCommitted\":1,\"shaderFailures\":0,"
"\"inputFramesReceived\":10,\"inputFramesDropped\":1,"
"\"inputConsumeMisses\":2,\"inputUploadMisses\":3,"