summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorClementTsang <cjhtsang@uwaterloo.ca>2020-02-05 19:53:42 -0500
committerClementTsang <cjhtsang@uwaterloo.ca>2020-02-05 19:53:42 -0500
commit7ea20283cf6f03650b65557febcd6c422786e1c9 (patch)
tree71743f58db9d98b32efb4746b11f3bac037f42bf
parent0b857f66097e4b22ca86d1dc5a5935780d2bcf18 (diff)
Update cargo to newer versions of crates
-rw-r--r--Cargo.toml4
-rw-r--r--src/data_conversion.rs36
2 files changed, 37 insertions, 3 deletions
diff --git a/Cargo.toml b/Cargo.toml
index eac009e8..14446421 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -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"
diff --git a/src/data_conversion.rs b/src/data_conversion.rs
index 2e1235b0..b3cc4acd 100644
--- a/src/data_conversion.rs
+++ b/src/data_conversion.rs
@@ -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>)> =