Skip to content

Commit fb25c3c

Browse files
authored
Update run_benchmarks.rb to pass the JSON to render_graph (#342)
* Update run_benchmarks.rb to pass the JSON to render_graph * Check that --graph works in CI
1 parent cdf3ee9 commit fb25c3c

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

.github/workflows/test.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,14 @@ jobs:
4040
MIN_BENCH_TIME: '0'
4141
SKIP_BENCHMARKS: ${{ matrix.skip }}
4242

43+
- name: Test run_benchmarks.rb --graph
44+
run: ./run_benchmarks.rb --graph fib
45+
if: matrix.ruby == 'ruby'
46+
env:
47+
WARMUP_ITRS: '1'
48+
MIN_BENCH_ITRS: '1'
49+
MIN_BENCH_TIME: '0'
50+
4351
- name: Test run_once.sh
4452
run: ./run_once.sh --yjit-stats benchmarks/railsbench/benchmark.rb
4553
if: matrix.ruby == 'head'

run_benchmarks.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -588,14 +588,14 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
588588
# Print the table to the console, with numbers truncated
589589
puts(output_str)
590590

591-
# Print CSV and PNG file names
591+
# Print JSON and PNG file names
592592
puts
593593
puts "Output:"
594594
puts out_json_path
595595
if args.graph
596596
require_relative 'misc/graph'
597597
out_graph_path = output_path + ".png"
598-
render_graph(out_tbl_path, out_graph_path)
598+
render_graph(out_json_path, out_graph_path)
599599
puts out_graph_path
600600
end
601601

0 commit comments

Comments
 (0)