aboutsummaryrefslogtreecommitdiff
path: root/devices
diff options
context:
space:
mode:
authorarjan <arjan@arjan-desktop.localdomain>2010-09-05 19:26:07 -0700
committerarjan <arjan@arjan-desktop.localdomain>2010-09-05 19:26:07 -0700
commit23354f61d7672dd9ece3c1b19bf98ff82200d12a (patch)
tree9c01c3bbfd16ebf4930e9fb5aa73755301173180 /devices
parenta42357a1d43f193e30517f7494a3cbb3cdaf8678 (diff)
downloadpowertop-23354f61d7672dd9ece3c1b19bf98ff82200d12a.tar.gz
print device power too
Diffstat (limited to 'devices')
-rw-r--r--devices/device.cpp8
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()
+ );
}
}