Skip to content

Commit

Permalink
Update burn-in script for new command-line options. Fix bug. (#347)
Browse files Browse the repository at this point in the history
  • Loading branch information
maximecb authored Nov 25, 2024
1 parent 6433b02 commit 257181e
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion burn_in.rb
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,11 @@ def free_file_path(parent_dir, name_prefix)
end

def run_benchmark(bench_name, logs_path, run_time, ruby_version)
# Determine the path to the benchmark script
script_path = File.join('benchmarks', bench_name, 'benchmark.rb')
if not File.exist?(script_path)
script_path = File.join('benchmarks', bench_name + '.rb')
end

# Assemble random environment variable options to test
test_env_vars = {}
Expand All @@ -74,10 +78,14 @@ def run_benchmark(bench_name, logs_path, run_time, ruby_version)
test_options = [
"--yjit-call-threshold=#{[1, 2, 10, 30].sample()}",
"--yjit-cold-threshold=#{[1, 2, 5, 10, 500, 50_000].sample()}",
"--yjit-exec-mem-size=#{[1, 2, 3, 4, 5, 10, 64, 128].sample()}",
[
"--yjit-mem-size=#{[1, 2, 3, 4, 5, 10, 64, 128].sample()}",
"--yjit-exec-mem-size=#{[1, 2, 3, 4, 5, 10, 64, 128].sample()}",
].sample(),
['--yjit-code-gc', nil].sample(),
['--yjit-perf', nil].sample(),
['--yjit-stats', nil].sample(),
['--yjit-log=/dev/null', nil].sample(),
].compact

# Assemble the command string
Expand Down

0 comments on commit 257181e

Please sign in to comment.