Skip to main content

Results

Struct Results 

Source
pub struct Results {
    pub schema: String,
    pub kernel: String,
    pub entry: String,
    pub plan_cc: String,
    pub device_name: String,
    pub device_cc: String,
    pub driver_version: String,
    pub candidates: Vec<CandidateResult>,
    pub total_gpu_seconds: f64,
    pub strategy: Option<String>,
    pub budget_exhausted: bool,
}

Fields§

§schema: String§kernel: String§entry: String§plan_cc: String§device_name: String§device_cc: String§driver_version: String§candidates: Vec<CandidateResult>§total_gpu_seconds: f64§strategy: Option<String>

Strategy that produced the visiting order (exhaustive | random:<seed>).

§budget_exhausted: bool

True when the sweep stopped because the wall budget ran out.

Implementations§

Source§

impl Results

Source

pub fn load(path: &Path) -> Result<Option<Self>, String>

Read results.v1 from a run directory.

Ok(None) means one thing only: the file is not there, so the measurement box has not run yet. Everything else is an error.

This used to be read_to_string(path).ok()? then from_str().ok(), so a truncated file, an empty one, null, [], a results.v2 from a newer runner and a directory named results.json all collapsed into that same None — and report rendered “nothing measured yet”, exit 0, nothing on stderr, with a JSON report that validated. The run directory is the hand-off between two machines, and the two conditions call for opposite actions: wait, or go and look. Nothing told them apart.

verdicts.v1 two lines away in the report builder already checked its schema tag by name; this is the same check, so a future results.v2 is refused by name rather than read as nothing.

§Errors

Any I/O error that is not NotFound, any parse failure, and any document whose schema is not results.v1 — each naming the path.

Source

pub fn checkpoint(&self, path: &Path) -> Result<(), String>

Atomic checkpoint: write to a temp file, then rename.

Trait Implementations§

Source§

impl Clone for Results

Source§

fn clone(&self) -> Results

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 Results

Source§

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

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

impl<'de> Deserialize<'de> for Results

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 Results

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§

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> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

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 = !

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

fn try_from(value: U) -> Result<T, !>

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.