pub struct MigrationPlan {
pub workload: MigratableWorkload,
pub source_device: usize,
pub target_device: usize,
pub estimated_cost: f64,
pub expected_benefit: f64,
pub net_benefit: f64,
pub created_at: Instant,
pub approved: bool,
}Expand description
A planned migration operation
Fields§
§workload: MigratableWorkloadThe workload to migrate
source_device: usizeSource device index
target_device: usizeDestination device index
estimated_cost: f64Estimated transfer cost
expected_benefit: f64Expected benefit (load reduction on source)
net_benefit: f64Net benefit (benefit - cost)
created_at: InstantPlan creation timestamp
approved: boolWhether the plan is approved for execution
Implementations§
Source§impl MigrationPlan
impl MigrationPlan
Sourcepub fn new(
workload: MigratableWorkload,
target_device: usize,
config: &MigrationConfig,
) -> Self
pub fn new( workload: MigratableWorkload, target_device: usize, config: &MigrationConfig, ) -> Self
Create a new migration plan
Sourcepub fn should_migrate(&self) -> bool
pub fn should_migrate(&self) -> bool
Check if migration should proceed
Trait Implementations§
Source§impl Clone for MigrationPlan
impl Clone for MigrationPlan
Source§fn clone(&self) -> MigrationPlan
fn clone(&self) -> MigrationPlan
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 moreAuto Trait Implementations§
impl Freeze for MigrationPlan
impl RefUnwindSafe for MigrationPlan
impl Send for MigrationPlan
impl Sync for MigrationPlan
impl Unpin for MigrationPlan
impl UnsafeUnpin for MigrationPlan
impl UnwindSafe for MigrationPlan
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