Curve

Struct Curve 

Source
pub struct Curve { /* private fields */ }
Expand description

The WCET curve model of a task’s cumulative execution-time demand. Similar to arrival curves, the cost of n consecutive jobs is specified by a vector of cumulative WCET for 1,2,3,… jobs and extrapolated from there.

Implementations§

Source§

impl Curve

Source

pub fn new(wcet_of_n_jobs: Vec<Service>) -> Self

Create a new WCET curve model based on the given finite prefix of cumulative demand.

The reference input wcet_of_n_jobs is assumed to start at one job, i.e., the first element of the vector (at offset zero) holds the maximum cost of any one job, the second element of the vector (at offset one) holds the cumulative cost of any two consecutive jobs, the third element of the vector (at offset two) holds the cumulative cost of any three consecutive jobs, etc.

Note: the constructor currently doesn’t check whether the input is well-formed, so garbage in => garbage out…

Source§

impl Curve

Source

pub fn from_trace( job_costs: impl Iterator<Item = Service>, max_n: usize, ) -> Curve

Source

pub fn extrapolate(&mut self, n: usize)

Trait Implementations§

Source§

impl Clone for Curve

Source§

fn clone(&self) -> Curve

Returns a duplicate 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 Curve

Source§

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

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

impl FromIterator<Service> for Curve

Source§

fn from_iter<I: IntoIterator<Item = Service>>(iter: I) -> Curve

Creates a value from an iterator. Read more
Source§

impl JobCostModel for Curve

Source§

fn cost_of_jobs(&self, n: usize) -> Service

Model: yield the maximum cumulative processor demand of any n consecutive jobs.
Source§

fn job_cost_iter<'a>(&'a self) -> Box<dyn Iterator<Item = Service> + 'a>

Model: iterate the maximum WCETs of any sequence of consecutive jobs.
Source§

fn least_wcet(&self, n: usize) -> Service

Model: yield the WCET of the job with the least WCET among any sequence of n consecutive jobs.

Auto Trait Implementations§

§

impl Freeze for Curve

§

impl RefUnwindSafe for Curve

§

impl Send for Curve

§

impl Sync for Curve

§

impl Unpin for Curve

§

impl UnwindSafe for Curve

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

Source§

fn into_either(self, into_left: bool) -> Either<Self, Self>

Converts self into a Left variant of Either<Self, Self> if into_left is true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
Source§

fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
where F: FnOnce(&Self) -> bool,

Converts self into a Left variant of Either<Self, Self> if into_left(&self) returns true. Converts self into a Right variant of Either<Self, Self> otherwise. Read more
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.