Enum Event

Source
#[non_exhaustive]
pub enum Event {
Show 13 variants Marker { ts_ms: u128, name: String, }, ResizePending { ts_ms: u128, w: u32, h: u32, }, ResizeApply { ts_ms: u128, w: u32, h: u32, dur_us: u128, }, SurfaceConfigure { ts_ms: u128, w: u32, h: u32, dur_us: u128, }, RenderFrame { ts_ms: u128, dur_us: u128, }, GetCurrentTextureErr { ts_ms: u128, err: String, }, MaximizeToggle { ts_ms: u128, to: bool, }, AboutToWaitRedraw { ts_ms: u128, awaiting_resize: bool, }, WindowInnerSizeSample { ts_ms: u128, w: u32, h: u32, }, Metric { ts_ms: u128, name: String, value: f64, role: MetricRole, }, TextPipelineFrame { ts_ms: u128, layout_us: u128, paint_us: u128, render_us: u128, draw_text_cmds: u32, }, TextAtlasFrame { ts_ms: u128, hits: u32, misses: u32, rasterized: u32, resets: u32, evictions_blocked: u32, glyphs_skipped: u32, pages_active: u32, }, IsolatedCompositorFrame {
Show 22 fields ts_ms: u128, scenario: String, isolated_pass_count: u32, isolated_pixels_total: u64, blur_pixels_total: u64, offscreen_peak_bytes: u64, pool_reuse_hits: u32, pool_allocs: u32, pool_reuse_ratio: f64, blur_pass_count: u32, stencil_offscreen_count: u32, downgrade_count: u32, downgrade_blur_clamped: u32, downgrade_surface_clamped: u32, downgrade_bytes_skipped: u32, backdrop_capture_count: u32, backdrop_pixels_total: u64, backdrop_blur_pass_count: u32, downgrade_backdrop_skipped: u32, blend_capture_count: u32, blend_composite_count: u32, downgrade_blend_skipped: u32,
},
}
Expand description

One JSONL event payload.

Timestamps are wall-clock milliseconds since the Unix epoch. Durations are microseconds. Dimensions and pixel counters use physical pixels unless a field says otherwise. Numeric metric values must be finite before a session accepts them.

§Examples

use ailloli_ui_bench::Event;

let event = Event::Metric {
    ts_ms: 1,
    name: "layout_us".into(),
    value: 42.0,
    role: ailloli_ui_bench::MetricRole::GatingSteady,
};
assert!(matches!(event, Event::Metric { value: 42.0, .. }));

Variants (Non-exhaustive)§

This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
§

Marker

Named checkpoint (including span end markers).

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§name: String

Caller-selected checkpoint name.

§

ResizePending

Window resize queued before GPU apply.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§w: u32

Pending physical width in pixels.

§h: u32

Pending physical height in pixels.

§

ResizeApply

Surface resize applied on the GPU path.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§w: u32

Applied physical width in pixels.

§h: u32

Applied physical height in pixels.

§dur_us: u128

GPU-path resize duration in microseconds.

§

SurfaceConfigure

GPU surface configuration.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§w: u32

Configured physical width in pixels.

§h: u32

Configured physical height in pixels.

§dur_us: u128

Surface configuration duration in microseconds.

§

RenderFrame

Full frame presented to the swapchain.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§dur_us: u128

Complete frame duration in microseconds.

§

GetCurrentTextureErr

Failed to acquire the current swapchain texture.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§err: String

Redacted diagnostic representation of the acquisition error.

§

MaximizeToggle

Window maximize state toggled.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§to: bool

true when transitioning to maximized state.

§

AboutToWaitRedraw

Event loop about to wait; may schedule redraw after resize.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§awaiting_resize: bool

Whether a queued resize still awaits renderer application.

§

WindowInnerSizeSample

Sampled inner window size.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§w: u32

Observed physical width in pixels.

§h: u32

Observed physical height in pixels.

§

Metric

Structured numeric sample.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§name: String

Stable metric name used to group samples.

§value: f64

Finite numeric sample in the unit encoded by name/documentation.

§role: MetricRole

Explicit comparison behavior. Missing roles in older artifacts deserialize as MetricRole::Diagnostic.

§

TextPipelineFrame

One text pipeline frame (layout + paint + render).

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§layout_us: u128

Text layout duration in microseconds.

§paint_us: u128

Text paint-command generation duration in microseconds.

§render_us: u128

Text renderer duration in microseconds.

§draw_text_cmds: u32

Number of text draw commands produced for the frame.

§

TextAtlasFrame

Glyph atlas cache statistics for one frame.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§hits: u32

Glyph cache lookup hits this frame.

§misses: u32

Glyph cache lookup misses this frame.

§rasterized: u32

Glyphs rasterized and uploaded this frame.

§resets: u32

Atlas pages reset for reuse this frame.

§evictions_blocked: u32

Evictions blocked because all candidate pages were pinned.

§glyphs_skipped: u32

Glyphs skipped because no atlas allocation was available.

§pages_active: u32

Atlas pages active after the frame.

§

IsolatedCompositorFrame

Isolated compositor metrics for one surface-backed frame.

Fields

§ts_ms: u128

Wall-clock timestamp in milliseconds since the Unix epoch.

§scenario: String

Scenario label copied into renderer metrics; empty means unspecified.

§isolated_pass_count: u32

Number of isolated offscreen passes rendered.

§isolated_pixels_total: u64

Total physical pixels covered by isolated targets.

§blur_pixels_total: u64

Total physical pixels processed by blur passes.

§offscreen_peak_bytes: u64

Peak bytes retained by the offscreen texture pool.

§pool_reuse_hits: u32

Pool leases served by an existing allocation.

§pool_allocs: u32

New offscreen allocations performed this frame.

§pool_reuse_ratio: f64

Reuse hits divided by hits plus allocations, in 0.0..=1.0.

§blur_pass_count: u32

Number of separable blur passes recorded.

§stencil_offscreen_count: u32

Isolated passes that required a stencil attachment.

§downgrade_count: u32

Total isolated-effect downgrades.

§downgrade_blur_clamped: u32

Blur radii reduced by policy limits.

§downgrade_surface_clamped: u32

Offscreen surfaces reduced by dimension/pixel limits.

§downgrade_bytes_skipped: u32

Isolated passes skipped by the byte budget.

§backdrop_capture_count: u32

Backdrop regions captured from the main framebuffer.

§backdrop_pixels_total: u64

Total physical pixels captured for backdrop effects.

§backdrop_blur_pass_count: u32

Blur passes applied to captured backdrop regions.

§downgrade_backdrop_skipped: u32

Backdrop effects skipped by the capture budget.

§blend_capture_count: u32

Destination regions captured for non-normal blending.

§blend_composite_count: u32

Shader blend composites recorded.

§downgrade_blend_skipped: u32

Destination-aware blends downgraded by policy limits.

Trait Implementations§

Source§

impl Clone for Event

Source§

fn clone(&self) -> Event

Returns a copy of the value. Read more
1.0.0 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for Event

Source§

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

Formats the value using the given formatter. Read more
Source§

impl<'de> Deserialize<'de> for Event

Source§

fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>
where __D: Deserializer<'de>,

Deserialize this value from the given Serde deserializer. Read more
Source§

impl Serialize for Event

Source§

fn serialize<__S>(&self, __serializer: __S) -> Result<__S::Ok, __S::Error>
where __S: Serializer,

Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

§

impl Freeze for Event

§

impl RefUnwindSafe for Event

§

impl Send for Event

§

impl Sync for Event

§

impl Unpin for Event

§

impl UnwindSafe for Event

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> 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> Same for T

Source§

type Output = T

Should always be Self
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.
Source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,