memonitor 0.2.4

Query CPU and GPU memory information in a portable way.
Documentation
use memonitor::{list_all_devices, list_backends};

mod common;

#[test]
fn all() {
    common::init_tracing();

    for backend in list_backends().iter() {
        println!("Backend found: {}", backend.name());
    }

    for device in list_all_devices().iter() {
        let stats = device.current_memory_stats();
        println!(
            "Device found: {} @ {:?} ({}) - Memory stats: {} bytes used out of {}, {} are free",
            device.name(),
            device.backend(),
            device.kind(),
            stats.used,
            stats.total,
            stats.available
        );
    }
}