Struct RunMetadata

Source
#[non_exhaustive]
pub struct RunMetadata {
Show 23 fields pub scenario: Option<String>, pub phase: Option<String>, pub git_revision: Option<String>, pub dirty_diff_hash: Option<String>, pub profile: Option<String>, pub harness: Option<String>, pub target: Option<String>, pub machine: Option<String>, pub operating_system: Option<String>, pub winit_version: Option<String>, pub backend: Option<String>, pub window_backend: Option<String>, pub renderer_backend: Option<String>, pub gpu: Option<String>, pub driver: Option<String>, pub window_width: Option<u32>, pub window_height: Option<u32>, pub scale_factor: Option<f64>, pub observed_scale_factor: Option<f64>, pub warmup_samples: Option<u32>, pub measured_samples: Option<u32>, pub time_origin: TimeOrigin, pub extensions: BTreeMap<String, Value>,
}
Expand description

Reproducibility metadata for one benchmark run.

Unknown JSON fields are intentionally tolerated by readers. Use Default and mutate the public fields instead of constructing this non-exhaustive structure as a literal.

Optional values are absent when unknown; empty strings are not normalized. Width and height are physical window pixels. Scale factors must be finite and positive when validated by a session or comparison workflow.

§Examples

use ailloli_ui_bench::RunMetadata;

let mut metadata = RunMetadata::default();
metadata.scenario = Some("scroll-tree".into());
metadata.window_width = Some(1280);
assert_eq!(metadata.scenario.as_deref(), Some("scroll-tree"));

Fields (Non-exhaustive)§

This struct is marked as non-exhaustive
Non-exhaustive structs could have additional fields added in future. Therefore, non-exhaustive structs cannot be constructed in external crates using the traditional Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.
§scenario: Option<String>

Stable benchmark scenario name, or None when unspecified.

§phase: Option<String>

Project phase or experiment label, or None when unspecified.

§git_revision: Option<String>

Source revision measured by this run.

§dirty_diff_hash: Option<String>

Digest of uncommitted source changes, when present.

§profile: Option<String>

Build profile such as release or debug.

§harness: Option<String>

Stable identity of the executable or harness which produced the run.

§target: Option<String>

Compilation target used for the measured executable, when known.

§machine: Option<String>

Stable caller-provided machine identity, when available.

Producers should use an opaque lab identifier rather than a hostname or another value which could disclose user information.

§operating_system: Option<String>

Operating-system identity used for run compatibility checks.

§winit_version: Option<String>

Winit version used by the measured host, when applicable.

§backend: Option<String>

Legacy backend field retained for version-one artifacts.

New producers should use Self::window_backend for the effective winit backend and Self::renderer_backend for the graphics backend.

§window_backend: Option<String>

Effective window-system backend observed by the winit adapter.

§renderer_backend: Option<String>

Effective graphics backend reported by the renderer adapter.

§gpu: Option<String>

GPU adapter identity reported by the renderer.

§driver: Option<String>

Graphics driver identity/version reported by the renderer.

§window_width: Option<u32>

Requested window width in physical pixels.

§window_height: Option<u32>

Requested window height in physical pixels.

§scale_factor: Option<f64>

Requested logical-to-physical device-pixel ratio.

§observed_scale_factor: Option<f64>

Device-pixel ratio read from the live native window.

This is deliberately separate from Self::scale_factor, which is a requested/configured value in version-one benchmark artifacts.

§warmup_samples: Option<u32>

Number of leading samples excluded from regression statistics.

§measured_samples: Option<u32>

Number of samples intended for measured statistics.

§time_origin: TimeOrigin

Reference point for every elapsed_us value in this run.

§extensions: BTreeMap<String, Value>

Provider-specific diagnostics which do not warrant a schema revision.

Trait Implementations§

Source§

impl Clone for RunMetadata

Source§

fn clone(&self) -> RunMetadata

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 RunMetadata

Source§

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

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

impl Default for RunMetadata

Source§

fn default() -> RunMetadata

Returns the “default value” for a type. Read more
Source§

impl<'de> Deserialize<'de> for RunMetadata

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 PartialEq for RunMetadata

Source§

fn eq(&self, other: &RunMetadata) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Serialize for RunMetadata

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
Source§

impl StructuralPartialEq for RunMetadata

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> 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>,