Module telemetry

Source
Expand description

Opt-in local recordings. GPU durations come only from tagged driver queries.

Structs§

FrameSample
FrameToken
LocalAllocCounter
Thread-local allocation counter suitable for #[global_allocator] in tests.
PhysicsWork
Session
A bounded recording. Reporting and screenshot encoding happen outside recorded frames.
ThreadAllocScope
RAII scope that counts heap allocations on the current thread from zero and restores prior counter state on drop. Requires LocalAllocCounter.
TrackingAllocator
Install once in an executable. Counts successful Rust allocations/reallocations, not C/driver allocations or live heap size. Counting is enabled only during recordings.

Functions§

count_thread_allocations
Run f while counting successful heap allocations on the current thread. Restores previous state on unwind. Requires LocalAllocCounter installed.
count_thread_allocations_with_bytes
Run f while counting successful heap allocation calls and bytes on the current thread. Restores previous state on unwind.
json_string
record_physics
Accumulate actual solver work for the current thread/frame, including catch-up ticks.
take_physics