Skip to main content

TelemetryEvent

Enum TelemetryEvent 

Source
pub enum TelemetryEvent {
    MetricUpdate {
        id: MetricId,
        value: MetricValue,
    },
    ResourceReport(ResourceUsageReport),
    HardwareReport(HardwareReport),
    GpuReport(GpuReport),
    PhaseChange(String),
    AgentCost {
        id: AgentId,
        n: f64,
        time_ms: f64,
    },
    WavePlan {
        waves: Vec<Vec<AgentId>>,
    },
    ComponentAccess {
        type_name: String,
        size_bytes: usize,
        query_count: u64,
        rows_scanned: u64,
    },
}
Expand description

A high-level telemetry event produced by the Hot Path or hardware sensors.

Variants§

§

MetricUpdate

A single metric sample update.

Fields

§id: MetricId

The metric identifier.

§value: MetricValue

The new value.

§

ResourceReport(ResourceUsageReport)

A hardware resource usage report (typically bytes/memory).

§

HardwareReport(HardwareReport)

A physical hardware health report (thermal, CPU load).

§

GpuReport(GpuReport)

A GPU performance report (frame timings, draw calls, triangles).

§

PhaseChange(String)

A change in the execution phase signaled by the engine.

§

AgentCost

A per-agent execution-cost sample: the workload size n an agent processed this frame and the wall-clock time it took. The DCC feeds these to a per-agent cost model (c·f(n)) so it can forecast a budget breach (“at this growth rate the frame budget breaks at ~N”) instead of only reacting. Published once per agent per frame from the hot path.

Fields

§id: AgentId

The agent that produced the sample.

§n: f64

Workload size processed this frame (e.g. live entity count).

§time_ms: f64

Wall-clock execution time, in milliseconds.

§

WavePlan

The scheduler’s per-frame wave plan: how the agents will actually be grouped for execution. Each inner list is one wave — agents that run concurrently (an Isolated set plus at most one SharedWorld agent); a singleton list is a serially-executed agent. Published only when parallel execution is enabled (serial execution needs no grouping — the DCC then falls back to summing per-agent costs).

The DCC uses it to cost a concurrent wave by its critical path (max of its members) instead of the sum, so budget fitting doesn’t leave frame time on the table for work that overlaps.

Fields

§waves: Vec<Vec<AgentId>>

Agent ids grouped by wave, in execution order.

§

ComponentAccess

A per-component access-pattern snapshot from the ECS, for the layout advisor (AGDF). Cumulative counters, sampled at a low rate (not every frame); the DCC turns them into a read-only layout recommendation.

Fields

§type_name: String

Component type name (for the glass-box report).

§size_bytes: usize

Component size in bytes (size_of).

§query_count: u64

Cumulative number of queries that touched this component.

§rows_scanned: u64

Cumulative rows scanned across those queries.

Trait Implementations§

Source§

impl Clone for TelemetryEvent

Source§

fn clone(&self) -> TelemetryEvent

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for TelemetryEvent

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> AppLifecycle for T
where T: ?Sized,

Source§

fn on_start(&mut self, ctx: &mut dyn AppContext)

Called once after the backend is up but before the first update. Apps install their theme / fonts here.
Source§

fn on_exit(&mut self)

Called once when the window is closing. Persist state here.
Source§

impl<T> AsAny for T
where T: Any,

Source§

fn as_any(&self) -> &(dyn Any + 'static)

Returns a reference to the inner value as &dyn Any.
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.