Skip to content

Commit e273822

Browse files
committed
chore: extra logs to debug command
1 parent 079e544 commit e273822

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "macmon"
3-
version = "0.3.1"
3+
version = "0.3.2"
44
edition = "2021"
55

66
[lints.rust]

readme.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ Options:
7575

7676
Controls:
7777
c - change color
78+
v - switch charts view: gauge / sparkline
7879
q - quit
7980
```
8081

src/debug.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
use core_foundation::base::CFRelease;
22

33
use crate::sources::{
4-
cfdict_keys, cfio_get_props, cfio_watts, get_dvfs_mhz, run_system_profiler, IOHIDSensors,
5-
IOReport, IOServiceIterator, SMC,
4+
cfdict_keys, cfio_get_props, cfio_get_residencies, cfio_watts, get_dvfs_mhz, run_system_profiler,
5+
IOHIDSensors, IOReport, IOServiceIterator, SMC,
66
};
77

88
type WithError<T> = Result<T, Box<dyn std::error::Error>>;
@@ -62,7 +62,7 @@ pub fn print_debug() -> WithError<()> {
6262
for x in ior.get_sample(dur) {
6363
let msg = format!("{} :: {} :: {} ({}) =", x.group, x.subgroup, x.channel, x.unit);
6464
match x.unit.as_str() {
65-
"24Mticks" => println!("{}", msg),
65+
"24Mticks" => println!("{} {:?}", msg, cfio_get_residencies(x.item)),
6666
_ => println!("{} {:.2}W", msg, cfio_watts(x.item, &x.unit, dur)?),
6767
}
6868
}

0 commit comments

Comments
 (0)