diff options
author | ClementTsang <cjhtsang@uwaterloo.ca> | 2022-05-15 04:25:48 -0400 |
---|---|---|
committer | ClementTsang <cjhtsang@uwaterloo.ca> | 2022-05-15 21:02:33 -0400 |
commit | ed17264832aaca8124cfd1b691ec16a560c7b50f (patch) | |
tree | 1f6fd76f89c6b5cccf6b4c703d9053f4f412ab0f /src/app/data_harvester.rs | |
parent | 7ee6f6a7373c915bde9e0c3860456b0aba6fdc8c (diff) |
refactor: more work towards unifying process code
A bunch of work towards also refactoring how the process widget
gathers and converts data.
Diffstat (limited to 'src/app/data_harvester.rs')
-rw-r--r-- | src/app/data_harvester.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/app/data_harvester.rs b/src/app/data_harvester.rs index 9dcc377c..7d3500dc 100644 --- a/src/app/data_harvester.rs +++ b/src/app/data_harvester.rs @@ -104,6 +104,9 @@ pub struct DataCollector { #[cfg(feature = "battery")] battery_list: Option<Vec<Battery>>, filters: DataFilters, + + #[cfg(target_family = "unix")] + user_table: self::processes::UserTable, } impl DataCollector { @@ -133,6 +136,8 @@ impl DataCollector { #[cfg(feature = "battery")] battery_list: None, filters, + #[cfg(target_family = "unix")] + user_table: Default::default(), } } @@ -191,7 +196,7 @@ impl DataCollector { }; } - pub fn set_collected_data(&mut self, used_widgets: UsedWidgets) { + pub fn set_data_collection(&mut self, used_widgets: UsedWidgets) { self.widgets_to_harvest = used_widgets; } @@ -270,6 +275,7 @@ impl DataCollector { .duration_since(self.last_collection_time) .as_secs(), self.mem_total_kb, + &mut self.user_table, ) } #[cfg(not(target_os = "linux"))] |