Skip to main content

SystemMonitor

Struct SystemMonitor 

Source
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

Source

pub fn new() -> Self

Create a new system monitor

Source

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
Source

pub fn record_operation(&self)

Record a GPU operation

Increments the operation counter. Call this after each GPU operation to track total workload.

Source

pub fn record_sync(&self)

Record a GPU sync

Increments the sync counter. Call this after each gpu_sync() call to track synchronization frequency.

Source

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.

Source

pub fn reset(&self)

Reset all counters and timers

Useful for starting fresh profiling sessions without creating a new monitor instance.

Trait Implementations§

Source§

impl Default for SystemMonitor

Source§

fn default() -> Self

Returns the “default value” for a type. Read more

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> Downcast<T> for T

Source§

fn downcast(&self) -> &T

Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, !>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<T> Upcast<T> for T

Source§

fn upcast(&self) -> Option<&T>

Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WasmNotSend for T
where T: Send,

Source§

impl<T> WasmNotSendSync for T

Source§

impl<T> WasmNotSync for T
where T: Sync,