pub struct ScaleConfig {
pub device_count: usize,
pub points_per_device: usize,
pub batch_size: usize,
pub memory_per_device: usize,
pub concurrent_connections: usize,
pub target_ops_per_sec: u64,
}Expand description
Scale configuration for simulations.
Fields§
§device_count: usizeNumber of virtual devices to create.
points_per_device: usizeNumber of data points per device.
batch_size: usizeBatch size for device creation/deletion.
memory_per_device: usizeEstimated memory per device in bytes.
concurrent_connections: usizeNumber of concurrent connections.
target_ops_per_sec: u64Target operations per second.
Implementations§
Source§impl ScaleConfig
impl ScaleConfig
Sourcepub fn with_device_count(self, count: usize) -> Self
pub fn with_device_count(self, count: usize) -> Self
Set device count.
Sourcepub fn with_points_per_device(self, count: usize) -> Self
pub fn with_points_per_device(self, count: usize) -> Self
Set points per device.
Sourcepub fn with_batch_size(self, size: usize) -> Self
pub fn with_batch_size(self, size: usize) -> Self
Set batch size.
Sourcepub fn with_memory_per_device(self, bytes: usize) -> Self
pub fn with_memory_per_device(self, bytes: usize) -> Self
Set memory per device.
Sourcepub fn total_points(&self) -> usize
pub fn total_points(&self) -> usize
Calculate total data points.
Sourcepub fn estimated_memory(&self) -> usize
pub fn estimated_memory(&self) -> usize
Calculate estimated total memory.
Sourcepub fn estimated_memory_mb(&self) -> f64
pub fn estimated_memory_mb(&self) -> f64
Calculate estimated memory in MB.
Sourcepub fn description(&self) -> String
pub fn description(&self) -> String
Get a description of this scale.
Trait Implementations§
Source§impl Clone for ScaleConfig
impl Clone for ScaleConfig
Source§fn clone(&self) -> ScaleConfig
fn clone(&self) -> ScaleConfig
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for ScaleConfig
impl Debug for ScaleConfig
Source§impl Default for ScaleConfig
impl Default for ScaleConfig
Source§impl<'de> Deserialize<'de> for ScaleConfig
impl<'de> Deserialize<'de> for ScaleConfig
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
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 From<ScalePreset> for ScaleConfig
impl From<ScalePreset> for ScaleConfig
Source§fn from(preset: ScalePreset) -> Self
fn from(preset: ScalePreset) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ScaleConfig
impl RefUnwindSafe for ScaleConfig
impl Send for ScaleConfig
impl Sync for ScaleConfig
impl Unpin for ScaleConfig
impl UnsafeUnpin for ScaleConfig
impl UnwindSafe for ScaleConfig
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