pub struct BalloonStats {
pub target_bytes: u64,
pub current_bytes: u64,
pub configured_bytes: u64,
}Expand description
Memory balloon statistics.
Fields§
§target_bytes: u64Target memory size in bytes.
This is the memory size the balloon is trying to achieve.
current_bytes: u64Current balloon size in bytes.
This is how much memory the balloon has currently claimed.
actual_guest_memory = configured_memory - current_balloon_size
configured_bytes: u64Configured VM memory size in bytes.
This is the maximum memory available to the guest when the balloon is fully deflated.
Implementations§
Source§impl BalloonStats
impl BalloonStats
Sourcepub const fn effective_memory(&self) -> u64
pub const fn effective_memory(&self) -> u64
Returns the effective memory available to the guest in bytes.
This is configured_bytes - current_bytes.
Sourcepub fn target_percent(&self) -> f64
pub fn target_percent(&self) -> f64
Returns the target memory as a percentage of configured memory.
Trait Implementations§
Source§impl Clone for BalloonStats
impl Clone for BalloonStats
Source§fn clone(&self) -> BalloonStats
fn clone(&self) -> BalloonStats
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 BalloonStats
impl Debug for BalloonStats
Source§impl Default for BalloonStats
impl Default for BalloonStats
Source§fn default() -> BalloonStats
fn default() -> BalloonStats
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for BalloonStats
impl<'de> Deserialize<'de> for BalloonStats
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
Auto Trait Implementations§
impl Freeze for BalloonStats
impl RefUnwindSafe for BalloonStats
impl Send for BalloonStats
impl Sync for BalloonStats
impl Unpin for BalloonStats
impl UnsafeUnpin for BalloonStats
impl UnwindSafe for BalloonStats
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