pub struct TileStats {
pub level: TileLevel,
pub count: u64,
pub total_ns: u64,
pub min_ns: u64,
pub max_ns: u64,
pub total_elements: u64,
pub cache_misses: u64,
pub total_flops: u64,
}Expand description
Tile-level profiling statistics.
Tracks per-tile performance metrics for hierarchical cache-blocked operations.
Used in conjunction with TcbGeometry and TilingConfig from the tiling module.
§Example
ⓘ
let mut profiler = BrickProfiler::new();
profiler.enable();
let tile_timer = profiler.start_tile(TileLevel::Macro, 0, 0);
// ... execute tile ...
profiler.stop_tile(tile_timer, 1024 * 1024);Fields§
§level: TileLevelTile level (Macro/Midi/Micro)
count: u64Total samples collected
total_ns: u64Total elapsed time (nanoseconds)
min_ns: u64Min elapsed time (nanoseconds)
max_ns: u64Max elapsed time (nanoseconds)
total_elements: u64Total elements processed
cache_misses: u64Total cache misses (estimated)
total_flops: u64Total arithmetic operations
Implementations§
Source§impl TileStats
impl TileStats
Sourcepub fn add_sample(&mut self, elapsed_ns: u64, elements: u64, flops: u64)
pub fn add_sample(&mut self, elapsed_ns: u64, elements: u64, flops: u64)
Add a sample to statistics.
Sourcepub fn throughput(&self) -> f64
pub fn throughput(&self) -> f64
Throughput in elements/second.
Sourcepub fn arithmetic_intensity(&self) -> f64
pub fn arithmetic_intensity(&self) -> f64
Arithmetic intensity (FLOP/byte) estimate.
Assumes 4 bytes per element (f32).
Sourcepub fn cache_efficiency(&self, peak_gflops: f64) -> f64
pub fn cache_efficiency(&self, peak_gflops: f64) -> f64
Estimated cache efficiency (0.0-1.0).
Based on ratio of actual throughput vs theoretical peak.
Trait Implementations§
Auto Trait Implementations§
impl Freeze for TileStats
impl RefUnwindSafe for TileStats
impl Send for TileStats
impl Sync for TileStats
impl Unpin for TileStats
impl UnsafeUnpin for TileStats
impl UnwindSafe for TileStats
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