pub struct RuntimeStats {
pub num_pages: usize,
pub num_textures: usize,
pub total_page_area: u64,
pub total_used_area: u64,
pub total_free_area: u64,
pub occupancy: f64,
pub num_free_rects: usize,
}Expand description
Runtime statistics for an atlas session.
Fields§
§num_pages: usizeNumber of pages currently allocated.
num_textures: usizeNumber of textures currently in the atlas.
total_page_area: u64Total area of all pages (width * height * num_pages).
total_used_area: u64Total area occupied by textures (sum of all used slots).
total_free_area: u64Total free area available for new textures.
occupancy: f64Occupancy ratio: used_area / total_page_area (0.0 to 1.0).
num_free_rects: usizeNumber of free rectangles/segments (fragmentation indicator).
Implementations§
Source§impl RuntimeStats
impl RuntimeStats
Sourcepub fn fragmentation(&self) -> f64
pub fn fragmentation(&self) -> f64
Returns the fragmentation ratio (higher = more fragmented). Calculated as: num_free_rects / (total_free_area / 1000) Lower is better (fewer, larger free blocks).
Sourcepub fn waste_percentage(&self) -> f64
pub fn waste_percentage(&self) -> f64
Returns the waste percentage (0.0 to 100.0).
Trait Implementations§
Source§impl Clone for RuntimeStats
impl Clone for RuntimeStats
Source§fn clone(&self) -> RuntimeStats
fn clone(&self) -> RuntimeStats
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 RuntimeStats
impl RefUnwindSafe for RuntimeStats
impl Send for RuntimeStats
impl Sync for RuntimeStats
impl Unpin for RuntimeStats
impl UnwindSafe for RuntimeStats
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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> 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