30 lines
1.3 KiB
C++
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;
|
|
};
|