query · developer.performance

Performance log summary

Returns min, average, and max values for the current or most recent bounded log.

developer.performance.log(filters?, cursor?, page_size?) -> query-page
Stable ID
developer.performance.log
Owner
app.runtime-performance-monitor
Authority
read_only
Timing
immediate
Availability
active-session
Side effects
none
Determinism
stable owner order at the current committed tick
Introduced
1.0.0

Usage

Call through world.query while a logging session is active or after it stops. Read min, average, and max FPS, frame time, process CPU, and resident-memory values without retaining native handles.

Parameters

Returns

One detached summary for the active or most recent log, including state, session identity, sample count, capacity, frame bounds, and metric ranges.

Cost

Reads a constant-time rolling summary maintained while recording and consumes one query, one result record, and one owner visit.

Fields

IDTypeUnitsRequiredDescription
average_cpu_msnumbermillisecondsyesAverage process CPU time.
average_cpu_percentnumberpercent-of-one-coreyesAverage process CPU load.
average_fpsnumberframes-per-secondyesAverage instantaneous frame rate.
average_frame_msnumbermillisecondsyesAverage frame duration.
average_memory_bytesunsigned-integerbytesyesAverage resident memory.
latest_memory_bytesunsigned-integerbytesyesLatest resident memory.
maximum_cpu_msnumbermillisecondsyesMaximum process CPU time.
maximum_cpu_percentnumberpercent-of-one-coreyesMaximum process CPU load.
maximum_fpsnumberframes-per-secondyesMaximum instantaneous frame rate.
maximum_frame_msnumbermillisecondsyesMaximum frame duration.
maximum_memory_bytesunsigned-integerbytesyesMaximum resident memory.
maximum_samplesunsigned-integernoneyesConfigured sample capacity.
memory_sample_countunsigned-integernoneyesSamples with available resident memory.
minimum_cpu_msnumbermillisecondsyesMinimum process CPU time.
minimum_cpu_percentnumberpercent-of-one-coreyesMinimum process CPU load.
minimum_fpsnumberframes-per-secondyesMinimum instantaneous frame rate.
minimum_frame_msnumbermillisecondsyesMinimum frame duration.
minimum_memory_bytesunsigned-integerbytesyesMinimum resident memory.
sample_countunsigned-integernoneyesRecorded sample count.
session_idunsigned-integernoneyesLogging session identity.
started_frameunsigned-integernoneyesFirst eligible frame index.
stateenumerationnoneyesLogging state.
stopped_frameunsigned-integernoneyesLast recorded frame or zero while active.

Errors

Examples

local result = world.query("developer.performance.log", {page_size = 1})
if result.status == "completed" then
    local log = result.records[1]
    ui.row("Minimum FPS", string.format("%.1f", log.minimum_fps))
    ui.row("Maximum memory", tostring(log.maximum_memory_bytes))
end

API history

Related symbols

Project references