OLD | NEW |
| 1 """ |
| 2 What's eating the battery life of my laptop? Why isn't it many more |
| 3 hours? Which software component causes the most power to be burned? |
| 4 These are important questions without a good answer... until now. |
| 5 """ |
1 import time, os | 6 import time, os |
2 from autotest_lib.client.bin import utils, profiler | 7 from autotest_lib.client.bin import utils, profiler |
3 | 8 |
4 class powertop(profiler.profiler): | 9 class powertop(profiler.profiler): |
5 version = 1 | 10 version = 1 |
6 preserve_srcdir = True | 11 preserve_srcdir = True |
7 | 12 |
8 # filenames: list of filenames to cat | 13 # filenames: list of filenames to cat |
9 def setup(self, *args, **dargs): | 14 def setup(self, *args, **dargs): |
10 os.chdir(self.srcdir) | 15 os.chdir(self.srcdir) |
(...skipping 15 matching lines...) Expand all Loading... |
26 output.write('\n=========================\n') | 31 output.write('\n=========================\n') |
27 output.close() | 32 output.close() |
28 | 33 |
29 | 34 |
30 def stop(self, test): | 35 def stop(self, test): |
31 os.kill(self.child_pid, 15) | 36 os.kill(self.child_pid, 15) |
32 | 37 |
33 | 38 |
34 def report(self, test): | 39 def report(self, test): |
35 return None | 40 return None |
OLD | NEW |