diff options
author | Marissa Wall <marissaw@google.com> | 2017-10-17 09:59:14 -0700 |
---|---|---|
committer | Marissa Wall <marissaw@google.com> | 2017-11-29 11:59:56 -0800 |
commit | 006e63477d93ef7ddc420f0efe050a9e8f2a16cf (patch) | |
tree | c4e13dd1e3d5a51e803922c3094b53f1633cf8e1 | |
parent | cc70270286ac84690c350e8e4d077ec72fd078a9 (diff) | |
download | lisa-006e63477d93ef7ddc420f0efe050a9e8f2a16cf.tar.gz |
experiments/power: Sleep until dhrystone dies
Killall does not work on background processes.
Instead, just sleep until the benchmark has finished.
A long sleep will also allow the hardware to cool down
and stop power measurements to be affected by heating.
Test: ./run_cpu_frequency.py
Change-Id: I78528aea52adb6c0e63755b20a0b8103406afb3f
-rwxr-xr-x | experiments/power/eas/run_cpu_frequency.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/experiments/power/eas/run_cpu_frequency.py b/experiments/power/eas/run_cpu_frequency.py index ecb1fb3..965ed7a 100755 --- a/experiments/power/eas/run_cpu_frequency.py +++ b/experiments/power/eas/run_cpu_frequency.py @@ -147,7 +147,7 @@ def experiment(): # Run dhrystone benchmark for longer than the requested time so # we have extra time to set up the measuring device target.execute('nohup {} -t {} -r {} 2>/dev/null 1>/dev/null' - ' &'.format(dhrystone, len(on_cpus), args.duration_s+60)) + ' &'.format(dhrystone, len(on_cpus), args.duration_s+30)) # Start measuring te.emeter.reset() @@ -158,8 +158,10 @@ def experiment(): # Stop measuring te.emeter.report(outdir, out_energy=energy, out_samples=samples) - # Kill dhrystone so it does not affect the next measurement - pids = target.killall('dhyrstone') + # Since we are using nohup, the benchmark doesn't show up in + # process list. Instead sleep until we can be sure the benchmark + # is dead. + sleep(30) # Restore all the cpus target.hotplug.online_all() |