pub struct TestExecutionStats {
pub states_captured: u64,
pub bytes_raw: u64,
pub bytes_compressed: u64,
pub same_fill_pages: u64,
/* private fields */
}Expand description
Test execution statistics with compression metrics
Tracks game state capture efficiency during test runs. Based on trueno-zram compression statistics patterns.
§Example
use jugar_probar::validators::TestExecutionStats;
let mut stats = TestExecutionStats::new();
stats.record_state_capture(4096, 1024);
stats.record_state_capture(4096, 512); // Same-fill page
assert!(stats.efficiency() > 0.5);Fields§
§states_captured: u64Total game states captured
bytes_raw: u64Bytes before compression
bytes_compressed: u64Bytes after compression
same_fill_pages: u64Same-fill pages detected (high compression)
Implementations§
Source§impl TestExecutionStats
impl TestExecutionStats
Sourcepub fn record_state_capture(&mut self, raw_bytes: u64, compressed_bytes: u64)
pub fn record_state_capture(&mut self, raw_bytes: u64, compressed_bytes: u64)
Record a state capture
Sourcepub fn compression_ratio(&self) -> f64
pub fn compression_ratio(&self) -> f64
Calculate compression ratio (raw / compressed)
Sourcepub fn efficiency(&self) -> f64
pub fn efficiency(&self) -> f64
Calculate compression efficiency (1 - compressed/raw)
Sourcepub fn storage_savings_mb(&self) -> f64
pub fn storage_savings_mb(&self) -> f64
Estimate storage savings in MB
Sourcepub fn compress_throughput(&self) -> f64
pub fn compress_throughput(&self) -> f64
Calculate compression throughput (bytes/sec)
Sourcepub fn same_fill_ratio(&self) -> f64
pub fn same_fill_ratio(&self) -> f64
Get same-fill page ratio
Trait Implementations§
Source§impl Clone for TestExecutionStats
impl Clone for TestExecutionStats
Source§fn clone(&self) -> TestExecutionStats
fn clone(&self) -> TestExecutionStats
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 TestExecutionStats
impl Debug for TestExecutionStats
Source§impl Default for TestExecutionStats
impl Default for TestExecutionStats
Source§fn default() -> TestExecutionStats
fn default() -> TestExecutionStats
Returns the “default value” for a type. Read more
Auto Trait Implementations§
impl Freeze for TestExecutionStats
impl RefUnwindSafe for TestExecutionStats
impl Send for TestExecutionStats
impl Sync for TestExecutionStats
impl Unpin for TestExecutionStats
impl UnsafeUnpin for TestExecutionStats
impl UnwindSafe for TestExecutionStats
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