1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16
// // Sysinfo // // Copyright (c) 2017 Guillaume Gomez // extern crate sysinfo; #[test] fn test_disks() { use sysinfo::SystemExt; let s = sysinfo::System::new(); println!("total memory: {}", s.get_total_memory()); println!("total cpu cores: {}", s.get_processor_list().len()); }