diff options
author | arjan <arjan@arjan-desktop.localdomain> | 2010-09-05 19:26:07 -0700 |
---|---|---|
committer | arjan <arjan@arjan-desktop.localdomain> | 2010-09-05 19:26:07 -0700 |
commit | 23354f61d7672dd9ece3c1b19bf98ff82200d12a (patch) | |
tree | 9c01c3bbfd16ebf4930e9fb5aa73755301173180 /devices | |
parent | a42357a1d43f193e30517f7494a3cbb3cdaf8678 (diff) | |
download | powertop-23354f61d7672dd9ece3c1b19bf98ff82200d12a.tar.gz |
print device power too
Diffstat (limited to 'devices')
-rw-r--r-- | devices/device.cpp | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/devices/device.cpp b/devices/device.cpp index 35c80e5..39ab62e 100644 --- a/devices/device.cpp +++ b/devices/device.cpp @@ -9,6 +9,8 @@ using namespace std; #include "ahci.h" #include "alsa.h" +#include "../parameters/parameters.h" + void device::start_measurement(void) { } @@ -47,10 +49,12 @@ void report_devices(void) printf("\n\nDevice statistics\n"); for (i = 0; i < all_devices.size(); i++) { - printf("%5.1f%% %s (%s) \n", + printf("%5.1f%% %6.2fW %s (%s) \n", all_devices[i]->utilization(), + all_devices[i]->power_usage(&all_results, &all_parameters), all_devices[i]->class_name(), - all_devices[i]->device_name()); + all_devices[i]->device_name() + ); } } |