Byte Engine Docs
Inspectorhttp

Summarize performance metrics

GET/metrics

Returns the distribution of every metric over the retained ticks, in milliseconds. The engine retains the last 1024 ticks. CPU metrics are named after the engine tracing spans they sum, such as GraphicsApplication::tick for the whole tick or Renderer::prepare for frame preparation. GPU metrics are frame for all GPU work of a frame, scene.<manager> for each scene pipeline manager, pass.<name> for each post-scene render pass, and stage.<name> for each stage a scene pipeline or pass times inside its own commands, such as the visibility pipeline's stage.shadow-maps and stage.material-evaluation, with @<sink> appended on sinks after the first. A stage that recorded nothing on a frame has no value for it. GPU times arrive once the frame that recorded them completes, so the newest frames in flight have none yet. delta is the frame delta the application clock advanced by.

Query Parameters

since?integer

Only ticks after this tick number.

Range0 <= value
presented?boolean

When true, only ticks in which a window acquired a swapchain image, so the frame could reach the screen. Ticks of a hidden or occluded window present nothing and skew timings.

Response Body

application/json

text/plain

text/plain

curl -X GET "https://example.com/metrics"
{  "ticks": 600,  "first_tick": 12,  "last_tick": 611,  "presented_ticks": 598,  "time_to_first_frame": 412.7,  "delta": {    "count": 600,    "mean": 16.67,    "min": 16.51,    "max": 33.4,    "p50": 16.67,    "p95": 16.71,    "p99": 33.3  },  "metrics": [    {      "name": "GraphicsApplication::tick",      "kind": "cpu",      "count": 600,      "mean": 3.21,      "min": 2.8,      "max": 9.7,      "p50": 3.1,      "p95": 4.2,      "p99": 8.9    },    {      "name": "frame",      "kind": "gpu",      "count": 598,      "mean": 5.42,      "min": 5.1,      "max": 7.9,      "p50": 5.4,      "p95": 5.9,      "p99": 7.1    },    {      "name": "pass.Bloom",      "kind": "gpu",      "count": 598,      "mean": 0.41,      "min": 0.39,      "max": 0.52,      "p50": 0.41,      "p95": 0.44,      "p99": 0.5    }  ]}