summaryrefslogtreecommitdiffstats
path: root/src/app
diff options
context:
space:
mode:
authorClement Tsang <34804052+ClementTsang@users.noreply.github.com>2020-10-02 22:12:07 -0400
committerGitHub <noreply@github.com>2020-10-02 22:12:07 -0400
commit5675d8192cbe94d7dbc3370315396a11a3aca02e (patch)
treef2a067fc3d5154a551f18e365150d67d34a54c6b /src/app
parentba7738e73ec46548210b96ddfbf52a2773c31168 (diff)
other: more traces to debug, update some deps (#264)
Minor update to update some dependencies and remove some traces.
Diffstat (limited to 'src/app')
-rw-r--r--src/app/data_harvester.rs11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/app/data_harvester.rs b/src/app/data_harvester.rs
index 285c4823..2e46559a 100644
--- a/src/app/data_harvester.rs
+++ b/src/app/data_harvester.rs
@@ -94,6 +94,7 @@ pub struct DataCollector {
impl Default for DataCollector {
fn default() -> Self {
+ trace!("Creating default data collector...");
DataCollector {
data: Data::default(),
sys: System::new_all(),
@@ -114,13 +115,18 @@ impl Default for DataCollector {
battery_manager: None,
battery_list: None,
#[cfg(target_os = "linux")]
- page_file_size_kb: unsafe { libc::sysconf(libc::_SC_PAGESIZE) as u64 / 1024 },
+ page_file_size_kb: unsafe {
+ let page_file_size_kb = libc::sysconf(libc::_SC_PAGESIZE) as u64 / 1024;
+ trace!("Page file size in KB: {}", page_file_size_kb);
+ page_file_size_kb
+ },
}
}
}
impl DataCollector {
pub fn init(&mut self) {
+ trace!("Initializing data collector.");
self.mem_total_kb = self.sys.get_total_memory();
trace!("Total memory in KB: {}", self.mem_total_kb);
@@ -139,9 +145,10 @@ impl DataCollector {
trace!("Running first run.");
futures::executor::block_on(self.update_data());
+ trace!("First run done. Sleeping for 250ms...");
std::thread::sleep(std::time::Duration::from_millis(250));
- trace!("Running first run cleanup now.");
+ trace!("First run done. Running first run cleanup now.");
self.data.cleanup();
trace!("Enabled widgets to harvest: {:#?}", self.widgets_to_harvest);