You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Two endpoints expose every observable signal SimDeck collects: `GET /api/health` for the bootstrap surface and `GET /api/metrics` for the running counters.
3
+
Use these endpoints to check whether a daemon is reachable and to diagnose stream performance.
4
4
5
-
## `GET /api/health`
5
+
## Health
6
6
7
-
Returns the static bootstrap information the browser client needs, plus a freshness timestamp.
7
+
```http
8
+
GET /api/health
9
+
```
10
+
11
+
Example:
8
12
9
13
```json
10
14
{
@@ -13,125 +17,54 @@ Returns the static bootstrap information the browser client needs, plus a freshn
|`latest_first_frame_ms`| First-frame startup time |
53
+
|`frames_dropped_server`| Server dropping stale frames to stay current |
54
+
|`keyframe_requests`| Stream refresh or recovery activity |
55
+
|`active_streams`| Open browser streams |
56
+
|`encoders[].encoder.overloadState`|`nominal`, `strained`, or `overloaded`|
57
+
|`client_streams`| Recent browser decoder and render reports |
116
58
117
-
This is an inferred pressure signal rather than a private macOS hardware queue
118
-
counter. It is useful for deciding when to lower stream resolution/FPS or switch
119
-
from hardware to software encoding. When `encoderMode` is `auto`, SimDeck uses
120
-
this signal to temporarily rebuild the active session with software H.264 if the
121
-
hardware encoder is overloaded, then retries hardware after a cooldown. The
122
-
`activeEncoderMode`, `autoSoftwareFallbackActive`, `autoSoftwareFallbacks`, and
123
-
`autoHardwareRetries` fields expose that state. `clientForeground` is `false`
124
-
when all current browser viewers for the simulator are hidden or unfocused; in
125
-
that state the native session uses software H.264 until a viewer returns
126
-
foreground.
59
+
If `overloadState` is `overloaded` or dropped frames keep increasing, lower stream quality or restart with software encoding:
127
60
128
-
### Client stream stats
129
-
130
-
`client_streams` is a rolling buffer of the most recent reports from browser stream transports. WebRTC clients normally send reports over the telemetry data channel, H.264 WebSocket clients send them on the stream socket, and simple clients can still post to `POST /api/client-stream-stats`. The server keeps the last 48 entries per `(clientId, kind)` pair.
The browser client uses these to render its in-app diagnostics overlay and to size its decoder workers. Every field is optional except `clientId` and `kind`; see [`ClientStreamStats`](https://github.com/NativeScript/SimDeck/blob/main/server/src/metrics/counters.rs) for the full schema.
0 commit comments