pub struct WorkloadContext(/* private fields */);Expand description
Wrapper around the C FDBWorkloadContext
Implementations§
Source§impl WorkloadContext
impl WorkloadContext
Sourcepub fn trace<S, S2, S3>(
&self,
severity: Severity,
name: S,
details: &[(S2, S3)],
)
pub fn trace<S, S2, S3>( &self, severity: Severity, name: S, details: &[(S2, S3)], )
Add a log entry in the FoundationDB logs
Sourcepub fn get_process_id(&self) -> u64
pub fn get_process_id(&self) -> u64
Get the process id of the workload
Sourcepub fn set_process_id(&self, id: u64)
pub fn set_process_id(&self, id: u64)
Set the process id of the workload
Sourcepub fn get_option<T>(&self, name: &str) -> Option<T>where
T: FromStr,
pub fn get_option<T>(&self, name: &str) -> Option<T>where
T: FromStr,
Get the value of a parameter from the simulation config file
/!\ getting an option consumes it, following call on that option will return None
Sourcepub fn client_count(&self) -> i32
pub fn client_count(&self) -> i32
Get the client id of the workload
Get a determinist 64-bit random number
Auto Trait Implementations§
impl Freeze for WorkloadContext
impl RefUnwindSafe for WorkloadContext
impl !Send for WorkloadContext
impl !Sync for WorkloadContext
impl Unpin for WorkloadContext
impl UnwindSafe for WorkloadContext
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
Mutably borrows from an owned value. Read more