Files
video-shader-toys/apps/LoopThroughWithOpenGLCompositing/runtime/HealthTelemetry.h
Aiden 739231d5a1
All checks were successful
CI / React UI Build (push) Successful in 10s
CI / Native Windows Build And Tests (push) Successful in 2m34s
CI / Windows Release Package (push) Successful in 2m42s
Phase 1 clean-up and separation of concerns
2026-05-10 23:21:13 +10:00

30 lines
1.3 KiB
C++

#pragma once
#include <cstdint>
#include <string>
class RuntimeHost;
// Phase 1 compatibility seam for status and timing reporting. The current
// implementation still writes through RuntimeHost, but callers can now target
// HealthTelemetry as the home for operational visibility work.
class HealthTelemetry
{
public:
explicit HealthTelemetry(RuntimeHost& runtimeHost);
void ReportSignalStatus(bool hasSignal, unsigned width, unsigned height, const std::string& modeName);
bool TryReportSignalStatus(bool hasSignal, unsigned width, unsigned height, const std::string& modeName);
void RecordPerformanceStats(double frameBudgetMilliseconds, double renderMilliseconds);
bool TryRecordPerformanceStats(double frameBudgetMilliseconds, double renderMilliseconds);
void RecordFramePacingStats(double completionIntervalMilliseconds, double smoothedCompletionIntervalMilliseconds,
double maxCompletionIntervalMilliseconds, uint64_t lateFrameCount, uint64_t droppedFrameCount, uint64_t flushedFrameCount);
bool TryRecordFramePacingStats(double completionIntervalMilliseconds, double smoothedCompletionIntervalMilliseconds,
double maxCompletionIntervalMilliseconds, uint64_t lateFrameCount, uint64_t droppedFrameCount, uint64_t flushedFrameCount);
private:
RuntimeHost& mRuntimeHost;
};