Skip to main content

Row

Struct Row 

Source
pub(crate) struct Row<'a> {
Show 13 fields pub(crate) name: &'static str, pub(crate) backend: Backend, pub(crate) module: &'a str, pub(crate) entry: &'a str, pub(crate) allow: Vec<String>, pub(crate) ir: Option<&'a Arc<Program>>, pub(crate) wall_ns: Vec<u64>, pub(crate) heap_peak: Vec<u64>, pub(crate) fuel_spent: u64, pub(crate) host_calls: u64, pub(crate) irreversible_writes: u64, pub(crate) instructions: Option<u64>, pub(crate) ok: bool,
}
Expand description

One benchmark on one backend, and the samples taken of it so far.

The series is a field rather than a local of the loop that fills it because SampleOrder::RoundRobin leaves and comes back: a row is opened once, sampled at whatever points in the suite the order says, and read only when every row is finished.

Fields§

§name: &'static str§backend: Backend§module: &'a str§entry: &'a str§allow: Vec<String>§ir: Option<&'a Arc<Program>>

The linear-memory program this row runs, on a vm row and nowhere else. Lowered per entry, because that is what cove_ir lowers.

§wall_ns: Vec<u64>§heap_peak: Vec<u64>§fuel_spent: u64§host_calls: u64§irreversible_writes: u64§instructions: Option<u64>§ok: bool

Implementations§

Source§

impl<'a> Row<'a>

Source

pub(crate) fn resolve( package: &'a Package, program: &Program, name: &'static str, backend: Backend, ir: Option<&'a Arc<Program>>, ) -> Result<Row<'a>, String>

Looks the benchmark’s entry up, without running anything.

Source

pub(crate) fn sample( &mut self, program: &Arc<Program>, sources: &Arc<SourceMap>, )

Runs the benchmark once more and keeps what that run measured.

The counters are assignments rather than accumulations because they are exact and every run produces the same ones: a benchmark that ran a different number of instructions on its ninth sample than on its first would be a different benchmark, and that is what fuel_spent being identical across a table is there to prove.

Source

pub(crate) fn report(&self, iterations: u32) -> ExecutionReport

What the row measured, once every sample of it has been taken.

Auto Trait Implementations§

§

impl<'a> Freeze for Row<'a>

§

impl<'a> RefUnwindSafe for Row<'a>

§

impl<'a> Send for Row<'a>

§

impl<'a> Sync for Row<'a>

§

impl<'a> Unpin for Row<'a>

§

impl<'a> UnsafeUnpin for Row<'a>

§

impl<'a> UnwindSafe for Row<'a>

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