From fb25c3c4ac866788b12d738fbb9c0d9f49437fc3 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Mon, 7 Oct 2024 22:42:48 +0200 Subject: [PATCH] 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 --- .github/workflows/test.yml | 8 ++++++++ run_benchmarks.rb | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 1c9fe03..aaa93e6 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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' diff --git a/run_benchmarks.rb b/run_benchmarks.rb index bf0ff1d..d8db9b3 100755 --- a/run_benchmarks.rb +++ b/run_benchmarks.rb @@ -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