Skip to content

Commit

Permalink
Update run_benchmarks.rb to pass the JSON to render_graph (#342)
Browse files Browse the repository at this point in the history
* Update run_benchmarks.rb to pass the JSON to render_graph

* Check that --graph works in CI
  • Loading branch information
eregon authored Oct 7, 2024
1 parent cdf3ee9 commit fb25c3c
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 2 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,14 @@ jobs:
MIN_BENCH_TIME: '0'
SKIP_BENCHMARKS: ${{ matrix.skip }}

- name: Test run_benchmarks.rb --graph
run: ./run_benchmarks.rb --graph fib
if: matrix.ruby == 'ruby'
env:
WARMUP_ITRS: '1'
MIN_BENCH_ITRS: '1'
MIN_BENCH_TIME: '0'

- name: Test run_once.sh
run: ./run_once.sh --yjit-stats benchmarks/railsbench/benchmark.rb
if: matrix.ruby == 'head'
4 changes: 2 additions & 2 deletions run_benchmarks.rb
Original file line number Diff line number Diff line change
Expand Up @@ -588,14 +588,14 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
# Print the table to the console, with numbers truncated
puts(output_str)

# Print CSV and PNG file names
# Print JSON and PNG file names
puts
puts "Output:"
puts out_json_path
if args.graph
require_relative 'misc/graph'
out_graph_path = output_path + ".png"
render_graph(out_tbl_path, out_graph_path)
render_graph(out_json_path, out_graph_path)
puts out_graph_path
end

Expand Down

0 comments on commit fb25c3c

Please sign in to comment.