Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,10 @@ def build_ujit(repo_dir):
os.chdir(cwd)

def set_bench_config():
# sudo requires the flag '-S' in order to take input from stdin
subprocess.check_call("sudo -S sh -c 'echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo'", shell=True)
subprocess.check_call("sudo -S sh -c 'echo 100 > /sys/devices/system/cpu/intel_pstate/min_perf_pct'", shell=True)
if os.path.exists('/sys/devices/system/cpu/intel_pstate'):
# sudo requires the flag '-S' in order to take input from stdin
subprocess.check_call("sudo -S sh -c 'echo 1 > /sys/devices/system/cpu/intel_pstate/no_turbo'", shell=True)
subprocess.check_call("sudo -S sh -c 'echo 100 > /sys/devices/system/cpu/intel_pstate/min_perf_pct'", shell=True)

def get_ruby_version():
ruby_version = subprocess.check_output(["ruby", "-v"])
Expand Down