Update cargo to newer versions of crates

This commit is contained in:
ClementTsang 2020-02-05 19:53:42 -05:00
parent 0b857f6609
commit 7ea20283cf
2 changed files with 37 additions and 3 deletions

View File

@ -31,10 +31,10 @@ futures = "0.3.3"
heim = "0.0.9"
log = "0.4.8"
regex = "1.3.4"
sysinfo = "0.9.6" #0.9 seems to be the last working version for my Ryzen PC...
sysinfo = "0.10.5"
tokio = "0.2.11"
winapi = "0.3.8"
tui = {version = "0.8", features = ["crossterm"], default-features = false }
tui = {version = "0.8", features = ["termion", "crossterm"], default-features = false }
lazy_static = "1.4.0"
backtrace = "0.3"
yaml-rust = "0.4.3"

View File

@ -58,6 +58,40 @@ impl From<&CpuPoint> for (f64, f64) {
}
}
pub fn convert_all(app: &App, current_data: &data_farmer::DataCollection) {
let current_time = current_data.current_instant;
// Network
let network_data: ConvertedNetworkData = ConvertedNetworkData::default();
let network_data_rx: Vec<(f64, f64)> = Vec::new();
let network_data_tx: Vec<(f64, f64)> = Vec::new();
let rx_display: String = String::default();
let tx_display: String = String::default();
let total_rx_display: String = String::default();
let total_tx_display: String = String::default();
// Disk
let mut disk_table_data: Vec<Vec<String>> = Vec::new();
// Temp
let temp_sensor_table_data: Vec<Vec<String>> = update_temp_row(app);
// Mem
let mut mem_vector: Vec<(f64, f64)> = Vec::new();
let mut swap_vector: Vec<(f64, f64)> = Vec::new();
let memory_and_swap_labels: (String, String);
// CPU
let mut cpu_vector: Vec<ConvertedCpuData> = Vec::new();
// Process
let mut process_single_list: HashMap<u32, ProcessHarvest> = HashMap::new();
let mut process_grouped_hashmap: HashMap<String, (u32, f64, f64, Vec<u32>)> =
std::collections::HashMap::new();
for (time, data) in &current_data.timed_data_vec {}
}
pub fn update_temp_row(app: &App) -> Vec<Vec<String>> {
let mut sensor_vector: Vec<Vec<String>> = Vec::new();
@ -313,7 +347,7 @@ pub fn convert_network_data_points(
pub fn convert_process_data(
current_data: &data_farmer::DataCollection,
) -> (HashMap<u32, ProcessHarvest>, Vec<ConvertedProcessData>) {
let mut single_list = HashMap::new();
let mut single_list: HashMap<u32, ProcessHarvest> = HashMap::new();
// cpu, mem, pids
let mut grouped_hashmap: HashMap<String, (u32, f64, f64, Vec<u32>)> =