pub struct SystemMonitor { /* private fields */ }Expand description
Real-time system monitor for GPU performance profiling
Tracks performance metrics over time with checkpoint-based profiling. Useful for debugging GPU operations and identifying performance bottlenecks.
§Example
use volta::gpu::system_monitor::SystemMonitor;
let monitor = SystemMonitor::new();
monitor.checkpoint("setup_start");
// ... GPU operations ...
monitor.checkpoint("setup_complete");
// ... more operations ...
let stats = monitor.stats();
println!("Ops/sec: {:.2}", stats.ops_per_sec);Implementations§
Source§impl SystemMonitor
impl SystemMonitor
Sourcepub fn checkpoint(&self, label: &str)
pub fn checkpoint(&self, label: &str)
Record a checkpoint with a descriptive label
Prints performance metrics including memory usage, operation counts, operations per second, sync count, and pending GPU operations.
§Arguments
label- Descriptive name for this checkpoint
Sourcepub fn record_operation(&self)
pub fn record_operation(&self)
Record a GPU operation
Increments the operation counter. Call this after each GPU operation to track total workload.
Sourcepub fn record_sync(&self)
pub fn record_sync(&self)
Record a GPU sync
Increments the sync counter. Call this after each gpu_sync() call
to track synchronization frequency.
Sourcepub fn stats(&self) -> MonitorStats
pub fn stats(&self) -> MonitorStats
Get current performance statistics
Returns a snapshot of performance metrics including elapsed time, peak memory usage, operation counts, and throughput.