cranpose_core/runtime/debug_stats.rs
1/// Sizes of a runtime's queues and tables, for leak and memory checks. A `_len` field counts
2/// entries and a `_cap` field the capacity reserved.
3#[derive(Debug, Clone, Copy, PartialEq, Eq, Default)]
4pub struct RuntimeDebugStats {
5 /// Node updates queued and not yet applied.
6 pub node_updates_len: usize,
7 /// Capacity reserved for the node updates.
8 pub node_updates_cap: usize,
9 /// Recompose scopes that were invalidated and not yet recomposed.
10 pub invalid_scopes_len: usize,
11 /// Entries in the queue of invalidated scopes.
12 pub scope_queue_len: usize,
13 /// Capacity reserved for the invalid scope queue.
14 pub scope_queue_cap: usize,
15 /// Frame callbacks waiting for the next frame.
16 pub frame_callbacks_len: usize,
17 /// Capacity reserved for the frame callbacks.
18 pub frame_callbacks_cap: usize,
19 /// UI-thread closures queued by `enqueue_ui_task` and not yet run.
20 pub local_tasks_len: usize,
21 /// Capacity reserved for the local tasks.
22 pub local_tasks_cap: usize,
23 /// UI continuations registered and waiting for a value.
24 pub ui_conts_len: usize,
25 /// Capacity reserved for the UI continuations.
26 pub ui_conts_cap: usize,
27 /// Futures from `spawn_ui` that have not finished.
28 pub tasks_len: usize,
29 /// Capacity reserved for the spawned tasks.
30 pub tasks_cap: usize,
31 /// States kept alive on behalf of the runtime itself, not of a Rust owner.
32 pub external_state_owners_len: usize,
33 /// Capacity reserved for the external state owners.
34 pub external_state_owners_cap: usize,
35 /// Messages posted from other threads that the UI thread has not run yet.
36 pub ui_dispatcher_pending: usize,
37}