pub struct MemoryEstimate {
pub primary_bytes: u64,
pub auxiliary_bytes: u64,
pub peak_bytes: u64,
pub confidence: f32,
}Expand description
Memory estimate for a workload.
Fields§
§primary_bytes: u64Primary memory requirement (main data structures).
auxiliary_bytes: u64Auxiliary memory (temporary buffers, working space).
peak_bytes: u64Peak memory usage (during execution).
confidence: f32Confidence level (0.0-1.0) of this estimate.
Implementations§
Source§impl MemoryEstimate
impl MemoryEstimate
Sourcepub fn new() -> MemoryEstimate
pub fn new() -> MemoryEstimate
Creates a new empty memory estimate.
Sourcepub fn primary(bytes: u64) -> MemoryEstimate
pub fn primary(bytes: u64) -> MemoryEstimate
Creates an estimate with only primary memory.
Sourcepub fn with_primary(self, bytes: u64) -> MemoryEstimate
pub fn with_primary(self, bytes: u64) -> MemoryEstimate
Builder method to set primary memory.
Sourcepub fn with_auxiliary(self, bytes: u64) -> MemoryEstimate
pub fn with_auxiliary(self, bytes: u64) -> MemoryEstimate
Builder method to set auxiliary memory.
Sourcepub fn with_peak(self, bytes: u64) -> MemoryEstimate
pub fn with_peak(self, bytes: u64) -> MemoryEstimate
Builder method to set peak memory.
Sourcepub fn with_confidence(self, confidence: f32) -> MemoryEstimate
pub fn with_confidence(self, confidence: f32) -> MemoryEstimate
Builder method to set confidence.
Sourcepub fn total_bytes(&self) -> u64
pub fn total_bytes(&self) -> u64
Total estimated memory in bytes.
Sourcepub fn combine(&self, other: &MemoryEstimate) -> MemoryEstimate
pub fn combine(&self, other: &MemoryEstimate) -> MemoryEstimate
Combines two estimates (for composite workloads).
Sourcepub fn scale(&self, factor: f64) -> MemoryEstimate
pub fn scale(&self, factor: f64) -> MemoryEstimate
Scales the estimate by a factor.
Trait Implementations§
Source§impl Clone for MemoryEstimate
impl Clone for MemoryEstimate
Source§fn clone(&self) -> MemoryEstimate
fn clone(&self) -> MemoryEstimate
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 MemoryEstimate
impl Debug for MemoryEstimate
Source§impl Default for MemoryEstimate
impl Default for MemoryEstimate
Source§fn default() -> MemoryEstimate
fn default() -> MemoryEstimate
Returns the “default value” for a type. Read more
Source§impl PartialEq for MemoryEstimate
impl PartialEq for MemoryEstimate
impl Copy for MemoryEstimate
impl StructuralPartialEq for MemoryEstimate
Auto Trait Implementations§
impl Freeze for MemoryEstimate
impl RefUnwindSafe for MemoryEstimate
impl Send for MemoryEstimate
impl Sync for MemoryEstimate
impl Unpin for MemoryEstimate
impl UnwindSafe for MemoryEstimate
Blanket Implementations§
Source§impl<T> ArchivePointee for T
impl<T> ArchivePointee for T
Source§type ArchivedMetadata = ()
type ArchivedMetadata = ()
The archived version of the pointer metadata for this type.
Source§fn pointer_metadata(
_: &<T as ArchivePointee>::ArchivedMetadata,
) -> <T as Pointee>::Metadata
fn pointer_metadata( _: &<T as ArchivePointee>::ArchivedMetadata, ) -> <T as Pointee>::Metadata
Converts some archived metadata to the pointer metadata for itself.
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<F, W, T, D> Deserialize<With<T, W>, D> for F
impl<F, W, T, D> Deserialize<With<T, W>, D> for F
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> LayoutRaw for T
impl<T> LayoutRaw for T
Source§fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
fn layout_raw(_: <T as Pointee>::Metadata) -> Result<Layout, LayoutError>
Gets the layout of the type.