System

Struct System 

Source
pub struct System<'a> { /* private fields */ }
Expand description

Type representing a System of Servers

Implementations§

Source§

impl<'a> System<'a>

Source

pub const fn new(servers: &'a [Server<'a>]) -> System<'a>

Create a new System from a slice of Servers, indexed by their priority, lowest index being the highest priority

Source

pub const fn as_servers(&self) -> &'a [Server<'a>]

Get a slice reference to the systems servers

Source

pub fn aggregated_higher_priority_demand_curve_iter<'b, CSDCI>( constrained_demand_curves: CSDCI, ) -> impl CurveIterator<CurveKind = HigherPriorityServerDemand> + Clone + 'b
where CSDCI::Item: CurveIterator<CurveKind = ConstrainedServerDemand> + Clone + 'b, CSDCI: IntoIterator,

Calculate the aggregated higher priority demand curve by aggregating the aggregated demand curves of all Servers with higher priority (lower value) than index.

Based on the papers Definition 12.

Source

pub fn aggregated_higher_priority_actual_execution_curve_iter<'b>( &'b self, server_index: usize, ) -> AggregationIterator<Box<dyn ClonableCurveIterator<'b, CurveKind = ActualServerExecution> + 'b>, <ActualServerExecution as CurveType>::WindowKind>

Source

pub fn system_wide_hyper_period(&self, server_index: usize) -> TimeUnit

Calculate the system wide hyper period accounting for all servers and tasks up to and including the server with priority server_index

Section 7.1 §2 Sentence 3, allows to exclude lower priority servers from the swh period calculation, when analysing tasks of a server

Source

pub fn analysis_end(&self, server_index: usize) -> TimeUnit

Source

pub fn original_unconstrained_server_execution_curve_iter( &self, server_index: usize, ) -> impl CurveIterator<CurveKind = UnconstrainedServerExecution> + Clone + '_

Calculate the unconstrained execution curve for the server with priority index.

See Definition 13. of the paper for reference

Source

pub fn fixed_unconstrained_server_execution_curve_iter( &self, server_index: usize, ) -> impl CurveIterator<CurveKind = UnconstrainedServerExecution> + Clone + '_

Source

pub fn original_actual_execution_curve_iter( &self, server_index: usize, ) -> impl CurveIterator<CurveKind = ActualServerExecution> + Clone + '_

Calculate the Constrained Execution Curve using Algorithm 4. from the paper TODO more detail, what do the parameters mean

§Panics

When a server is not guaranteed its capacity every interval

Source

pub fn fixed_actual_execution_curve_iter( &self, server_index: usize, ) -> impl CurveIterator<CurveKind = ActualServerExecution> + Clone + '_

Trait Implementations§

Source§

impl<'a> Debug for System<'a>

Source§

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

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<'a> Freeze for System<'a>

§

impl<'a> RefUnwindSafe for System<'a>

§

impl<'a> Send for System<'a>

§

impl<'a> Sync for System<'a>

§

impl<'a> Unpin for System<'a>

§

impl<'a> UnwindSafe for System<'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.