dispatch event intergration
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
#pragma once
|
||||
|
||||
#include <mutex>
|
||||
#include <cstddef>
|
||||
#include <cstdint>
|
||||
#include <string>
|
||||
|
||||
@@ -43,11 +44,37 @@ public:
|
||||
uint64_t flushedFrameCount = 0;
|
||||
};
|
||||
|
||||
struct RuntimeEventQueueSnapshot
|
||||
{
|
||||
std::string queueName = "runtime-events";
|
||||
std::size_t depth = 0;
|
||||
std::size_t capacity = 0;
|
||||
uint64_t droppedCount = 0;
|
||||
double oldestEventAgeMilliseconds = 0.0;
|
||||
};
|
||||
|
||||
struct RuntimeEventDispatchSnapshot
|
||||
{
|
||||
uint64_t dispatchCallCount = 0;
|
||||
uint64_t dispatchedEventCount = 0;
|
||||
uint64_t handlerInvocationCount = 0;
|
||||
uint64_t handlerFailureCount = 0;
|
||||
double lastDispatchDurationMilliseconds = 0.0;
|
||||
double maxDispatchDurationMilliseconds = 0.0;
|
||||
};
|
||||
|
||||
struct RuntimeEventMetricsSnapshot
|
||||
{
|
||||
RuntimeEventQueueSnapshot queue;
|
||||
RuntimeEventDispatchSnapshot dispatch;
|
||||
};
|
||||
|
||||
struct Snapshot
|
||||
{
|
||||
SignalStatusSnapshot signal;
|
||||
VideoIOStatusSnapshot videoIO;
|
||||
PerformanceSnapshot performance;
|
||||
RuntimeEventMetricsSnapshot runtimeEvents;
|
||||
};
|
||||
|
||||
HealthTelemetry() = default;
|
||||
@@ -70,9 +97,20 @@ public:
|
||||
bool TryRecordFramePacingStats(double completionIntervalMilliseconds, double smoothedCompletionIntervalMilliseconds,
|
||||
double maxCompletionIntervalMilliseconds, uint64_t lateFrameCount, uint64_t droppedFrameCount, uint64_t flushedFrameCount);
|
||||
|
||||
void RecordRuntimeEventQueueMetrics(const std::string& queueName, std::size_t depth, std::size_t capacity,
|
||||
uint64_t droppedCount, double oldestEventAgeMilliseconds);
|
||||
bool TryRecordRuntimeEventQueueMetrics(const std::string& queueName, std::size_t depth, std::size_t capacity,
|
||||
uint64_t droppedCount, double oldestEventAgeMilliseconds);
|
||||
|
||||
void RecordRuntimeEventDispatchStats(std::size_t dispatchedEvents, std::size_t handlerInvocations,
|
||||
std::size_t handlerFailures, double dispatchDurationMilliseconds);
|
||||
bool TryRecordRuntimeEventDispatchStats(std::size_t dispatchedEvents, std::size_t handlerInvocations,
|
||||
std::size_t handlerFailures, double dispatchDurationMilliseconds);
|
||||
|
||||
SignalStatusSnapshot GetSignalStatusSnapshot() const;
|
||||
VideoIOStatusSnapshot GetVideoIOStatusSnapshot() const;
|
||||
PerformanceSnapshot GetPerformanceSnapshot() const;
|
||||
RuntimeEventMetricsSnapshot GetRuntimeEventMetricsSnapshot() const;
|
||||
Snapshot GetSnapshot() const;
|
||||
|
||||
private:
|
||||
@@ -80,4 +118,5 @@ private:
|
||||
SignalStatusSnapshot mSignalStatus;
|
||||
VideoIOStatusSnapshot mVideoIOStatus;
|
||||
PerformanceSnapshot mPerformance;
|
||||
RuntimeEventMetricsSnapshot mRuntimeEvents;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user