pub struct LoadBalancingStats {
pub total_nodes: usize,
pub availablenodes: usize,
pub total_assignments: usize,
pub assignment_distribution: HashMap<String, usize>,
pub average_load: f64,
pub strategy: LoadBalancingStrategy,
}Expand description
Load balancing statistics
Fields§
§total_nodes: usize§availablenodes: usize§total_assignments: usize§assignment_distribution: HashMap<String, usize>§average_load: f64§strategy: LoadBalancingStrategyImplementations§
Source§impl LoadBalancingStats
impl LoadBalancingStats
Sourcepub fn balance_score(&self) -> f64
pub fn balance_score(&self) -> f64
Calculate load distribution balance (0.0 = perfect balance, 1.0 = maximum imbalance)
Sourcepub fn is_well_balanced(&self) -> bool
pub fn is_well_balanced(&self) -> bool
Check if load is well balanced
Trait Implementations§
Auto Trait Implementations§
impl Freeze for LoadBalancingStats
impl RefUnwindSafe for LoadBalancingStats
impl Send for LoadBalancingStats
impl Sync for LoadBalancingStats
impl Unpin for LoadBalancingStats
impl UnwindSafe for LoadBalancingStats
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
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
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 moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
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