shadow_rs::core::configuration

Struct ExperimentalOptions

source
pub struct ExperimentalOptions {
Show 23 fields pub use_sched_fifo: Option<bool>, pub use_syscall_counters: Option<bool>, pub use_object_counters: Option<bool>, pub use_preload_libc: Option<bool>, pub use_preload_openssl_rng: Option<bool>, pub use_preload_openssl_crypto: Option<bool>, pub use_memory_manager: Option<bool>, pub use_cpu_pinning: Option<bool>, pub use_worker_spinning: Option<bool>, pub runahead: Option<NullableOption<Time<TimePrefix>>>, pub use_dynamic_runahead: Option<bool>, pub socket_send_buffer: Option<Bytes<SiPrefixUpper>>, pub socket_send_autotune: Option<bool>, pub socket_recv_buffer: Option<Bytes<SiPrefixUpper>>, pub socket_recv_autotune: Option<bool>, pub interface_qdisc: Option<QDiscMode>, pub strace_logging_mode: Option<StraceLoggingMode>, pub max_unapplied_cpu_latency: Option<Time<TimePrefix>>, pub unblocked_syscall_latency: Option<Time<TimePrefix>>, pub unblocked_vdso_latency: Option<Time<TimePrefix>>, pub scheduler: Option<Scheduler>, pub report_errors_to_stderr: Option<bool>, pub use_new_tcp: Option<bool>,
}

Fields§

§use_sched_fifo: Option<bool>

Use the SCHED_FIFO scheduler. Requires CAP_SYS_NICE. See sched(7), capabilities(7)

§use_syscall_counters: Option<bool>

Count the number of occurrences for individual syscalls

§use_object_counters: Option<bool>

Count object allocations and deallocations. If disabled, we will not be able to detect object memory leaks

§use_preload_libc: Option<bool>

Preload our libc library for all managed processes for fast syscall interposition when possible.

§use_preload_openssl_rng: Option<bool>

Preload our OpenSSL RNG library for all managed processes to mitigate non-deterministic use of OpenSSL.

§use_preload_openssl_crypto: Option<bool>

Preload our OpenSSL crypto library for all managed processes to skip some crypto operations (may speed up simulation if your CPU lacks AES-NI support, but can cause bugs so do not use unless you know what you’re doing).

§use_memory_manager: Option<bool>

Use the MemoryManager in memory-mapping mode. This can improve performance, but disables support for dynamically spawning processes inside the simulation (e.g. the fork syscall).

§use_cpu_pinning: Option<bool>

Pin each thread and any processes it executes to the same logical CPU Core to improve cache affinity

§use_worker_spinning: Option<bool>

Each worker thread will spin in a sched_yield loop while waiting for a new task. This is ignored if not using the thread-per-core scheduler.

§runahead: Option<NullableOption<Time<TimePrefix>>>

If set, overrides the automatically calculated minimum time workers may run ahead when sending events between nodes

§use_dynamic_runahead: Option<bool>

Update the minimum runahead dynamically throughout the simulation.

§socket_send_buffer: Option<Bytes<SiPrefixUpper>>

Initial size of the socket’s send buffer

§socket_send_autotune: Option<bool>

Enable send window autotuning

§socket_recv_buffer: Option<Bytes<SiPrefixUpper>>

Initial size of the socket’s receive buffer

§socket_recv_autotune: Option<bool>

Enable receive window autotuning

§interface_qdisc: Option<QDiscMode>

The queueing discipline to use at the network interface

§strace_logging_mode: Option<StraceLoggingMode>

Log the syscalls for each process to individual “strace” files

§max_unapplied_cpu_latency: Option<Time<TimePrefix>>

Max amount of execution-time latency allowed to accumulate before the clock is moved forward. Moving the clock forward is a potentially expensive operation, so larger values reduce simulation overhead, at the cost of coarser time jumps. Note also that accumulated-but-unapplied latency is discarded when a thread is blocked on a syscall.

§unblocked_syscall_latency: Option<Time<TimePrefix>>

Simulated latency of an unblocked syscall. For efficiency Shadow only actually adds this latency if and when max_unapplied_cpu_latency is reached.

§unblocked_vdso_latency: Option<Time<TimePrefix>>

Simulated latency of a vdso “syscall”. For efficiency Shadow only actually adds this latency if and when max_unapplied_cpu_latency is reached.

§scheduler: Option<Scheduler>

The host scheduler implementation, which decides how to assign hosts to threads and threads to CPU cores

§report_errors_to_stderr: Option<bool>

When true, report error-level messages to stderr in addition to logging to stdout.

§use_new_tcp: Option<bool>

Use the rust TCP implementation

Implementations§

source§

impl ExperimentalOptions

source

pub fn with_defaults(self, default: Self) -> Self

Replace unset (None) values of base with values from default.

Trait Implementations§

source§

impl Args for ExperimentalOptions

source§

fn group_id() -> Option<Id>

Report the ArgGroup::id for this set of arguments
source§

fn augment_args<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate Self via FromArgMatches::from_arg_matches_mut Read more
source§

fn augment_args_for_update<'b>(__clap_app: Command) -> Command

Append to Command so it can instantiate self via FromArgMatches::update_from_arg_matches_mut Read more
source§

impl Clone for ExperimentalOptions

source§

fn clone(&self) -> ExperimentalOptions

Returns a copy 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 CommandFactory for ExperimentalOptions

source§

fn command<'b>() -> Command

Build a Command that can instantiate Self. Read more
source§

fn command_for_update<'b>() -> Command

Build a Command that can update self. Read more
source§

impl Debug for ExperimentalOptions

source§

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

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

impl Default for ExperimentalOptions

source§

fn default() -> Self

Returns the “default value” for a type. Read more
source§

impl<'de> Deserialize<'de> for ExperimentalOptions

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 FromArgMatches for ExperimentalOptions

source§

fn from_arg_matches(__clap_arg_matches: &ArgMatches) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn from_arg_matches_mut( __clap_arg_matches: &mut ArgMatches, ) -> Result<Self, Error>

Instantiate Self from ArgMatches, parsing the arguments as needed. Read more
source§

fn update_from_arg_matches( &mut self, __clap_arg_matches: &ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

fn update_from_arg_matches_mut( &mut self, __clap_arg_matches: &mut ArgMatches, ) -> Result<(), Error>

Assign values from ArgMatches to self.
source§

impl JsonSchema for ExperimentalOptions

source§

fn schema_name() -> String

The name of the generated JSON Schema. Read more
source§

fn schema_id() -> Cow<'static, str>

Returns a string that uniquely identifies the schema produced by this type. Read more
source§

fn json_schema(gen: &mut SchemaGenerator) -> Schema

Generates a JSON Schema for this type. Read more
source§

fn is_referenceable() -> bool

Whether JSON Schemas generated for this type should be re-used where possible using the $ref keyword. Read more
source§

impl Merge for ExperimentalOptions

source§

fn merge(&mut self, other: Self)

Merge another object into this object.
source§

impl Parser for ExperimentalOptions

source§

fn parse() -> Self

Parse from std::env::args_os(), exit on error.
source§

fn try_parse() -> Result<Self, Error>

Parse from std::env::args_os(), return Err on error.
source§

fn parse_from<I, T>(itr: I) -> Self
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, exit on error.
source§

fn try_parse_from<I, T>(itr: I) -> Result<Self, Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Parse from iterator, return Err on error.
source§

fn update_from<I, T>(&mut self, itr: I)
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, exit on error. Read more
source§

fn try_update_from<I, T>(&mut self, itr: I) -> Result<(), Error>
where I: IntoIterator<Item = T>, T: Into<OsString> + Clone,

Update from iterator, return Err on error.
source§

impl Serialize for ExperimentalOptions

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
source§

impl<T> DynClone for T
where T: Clone,

source§

fn __clone_box(&self, _: Private) -> *mut ()

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

source§

type This = T

source§

impl<T> Pointable for T

source§

const ALIGN: usize = _

The alignment of pointer.
source§

type Init = T

The type for initializers.
source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. 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.
source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

source§

fn vzip(self) -> V

source§

impl<T> DeserializeOwned for T
where T: for<'de> Deserialize<'de>,

source§

impl<T> Host for T
where T: Debug + Send,

source§

impl<T> Host for T
where T: Debug + Send + 'static,

source§

impl<T> Host for T
where T: Host + Host,