mirror of
https://github.com/ClementTsang/bottom.git
synced 2025-07-31 01:24:31 +02:00
hmm
This commit is contained in:
parent
6b80f87f21
commit
efdce02d10
@ -289,10 +289,7 @@ impl DataCollection {
|
||||
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
fn eat_cache(&mut self, cache: memory::MemHarvest, new_entry: &mut TimedData) {
|
||||
// Cache and buffer memory
|
||||
new_entry.cache_data = cache.checked_percent();
|
||||
|
||||
// In addition copy over latest data for easy reference
|
||||
self.cache_harvest = cache;
|
||||
}
|
||||
|
||||
|
@ -13,21 +13,38 @@ use crate::{
|
||||
widgets::{DiskWidgetData, TempWidgetData},
|
||||
};
|
||||
|
||||
#[derive(Default, Debug)]
|
||||
pub struct ConvertedNetworkData {
|
||||
pub rx: Vec<Point>,
|
||||
pub tx: Vec<Point>,
|
||||
pub rx_display: String,
|
||||
pub tx_display: String,
|
||||
pub total_rx_display: Option<String>,
|
||||
pub total_tx_display: Option<String>,
|
||||
// TODO: [NETWORKING] add min/max/mean of each
|
||||
// min_rx : f64,
|
||||
// max_rx : f64,
|
||||
// mean_rx: f64,
|
||||
// min_tx: f64,
|
||||
// max_tx: f64,
|
||||
// mean_tx: f64,
|
||||
// TODO: [NETWORKING] add min/max/mean of each
|
||||
// min_rx : f64,
|
||||
// max_rx : f64,
|
||||
// mean_rx: f64,
|
||||
// min_tx: f64,
|
||||
// max_tx: f64,
|
||||
// mean_tx: f64,
|
||||
#[derive(Debug)]
|
||||
pub enum ConvertedNetworkData {
|
||||
Normal {
|
||||
rx: Vec<Point>,
|
||||
tx: Vec<Point>,
|
||||
rx_display: String,
|
||||
tx_display: String,
|
||||
},
|
||||
Basic {
|
||||
rx_display: String,
|
||||
tx_display: String,
|
||||
total_rx_display: String,
|
||||
total_tx_display: String,
|
||||
},
|
||||
}
|
||||
|
||||
impl Default for ConvertedNetworkData {
|
||||
fn default() -> Self {
|
||||
Self::Normal {
|
||||
rx: Default::default(),
|
||||
tx: Default::default(),
|
||||
rx_display: Default::default(),
|
||||
tx_display: Default::default(),
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Clone, Debug)]
|
||||
@ -43,12 +60,7 @@ pub enum CpuWidgetData {
|
||||
|
||||
#[derive(Default)]
|
||||
pub struct ConvertedData {
|
||||
pub rx_display: String,
|
||||
pub tx_display: String,
|
||||
pub total_rx_display: String,
|
||||
pub total_tx_display: String,
|
||||
pub network_data_rx: Vec<Point>,
|
||||
pub network_data_tx: Vec<Point>,
|
||||
pub network: ConvertedNetworkData,
|
||||
|
||||
pub mem_labels: Option<(String, String)>,
|
||||
#[cfg(not(target_os = "windows"))]
|
||||
|
Loading…
x
Reference in New Issue
Block a user