pub struct Simulation<'a> {
pub configuration: ConfigurationValue,
pub seed: usize,
pub shared: SimulationShared,
pub mutable: SimulationMut,
pub warmup: Time,
pub measured: Time,
pub server_queue_size: usize,
pub event_queue: EventQueue,
pub statistics: Statistics,
pub launch_configurations: Vec<ConfigurationValue>,
pub plugs: &'a Plugs,
pub memory_report_period: Option<Time>,
}Expand description
The object representing the whole simulation.
Fields§
§configuration: ConfigurationValueThe whole parsed configuration.
seed: usizeThe seed of the random number generator.
Encapsulated data of the simulation intended to be readable by many.
mutable: SimulationMutEncapsulated data intended to be mutable by any.
warmup: TimeCycles of preparation before the actual measured execution
measured: TimeCycles of measurement
server_queue_size: usizeMaximum number of messages for generation to store in each server. Its default value is 20 messages.
Attempts to generate traffic that fails because of the limit are tracked into the missed_generations statistic.
Note that packets are not generated until it is the turn for the message to be sent to a router.
event_queue: EventQueueThe queue of events guiding the simulation.
statistics: StatisticsThe statistics being collected.
launch_configurations: Vec<ConfigurationValue>Information abut how to launch simulations to different systems.
plugs: &'a PlugsPlugged functions to build traffics, routers, etc.
memory_report_period: Option<Time>Number of cycles to wait between reports of memory usage.
Implementations§
Source§impl<'a> Simulation<'a>
impl<'a> Simulation<'a>
pub fn new(cv: &ConfigurationValue, plugs: &'a Plugs) -> Simulation<'a>
Sourcepub fn get_simulation_results(&self) -> ConfigurationValue
pub fn get_simulation_results(&self) -> ConfigurationValue
Get config value for the simulation results.
Trait Implementations§
Source§impl<'a> Quantifiable for Simulation<'a>
impl<'a> Quantifiable for Simulation<'a>
Source§fn total_memory(&self) -> usize
fn total_memory(&self) -> usize
Source§fn print_memory_breakdown(&self)
fn print_memory_breakdown(&self)
Source§fn forecast_total_memory(&self) -> usize
fn forecast_total_memory(&self) -> usize
Auto Trait Implementations§
impl<'a> Freeze for Simulation<'a>
impl<'a> !RefUnwindSafe for Simulation<'a>
impl<'a> !Send for Simulation<'a>
impl<'a> !Sync for Simulation<'a>
impl<'a> Unpin for Simulation<'a>
impl<'a> !UnwindSafe for Simulation<'a>
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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