From 2d5232af89d5a65c0060b38882e789c3b046c6a7 Mon Sep 17 00:00:00 2001 From: Benoit Daloze Date: Sun, 6 Oct 2024 19:24:17 +0200 Subject: [PATCH 1/2] Store the command line in the JSON file * So the used flags are recorded in the JSON file (some flags do not affect RUBY_DESCRIPTION). * Print the JSON file path for convenience. --- run_benchmarks.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/run_benchmarks.rb b/run_benchmarks.rb index 2047cb1..13ab798 100755 --- a/run_benchmarks.rb +++ b/run_benchmarks.rb @@ -295,7 +295,8 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat result = check_call(cmd.shelljoin, env: env, raise_error: false) if result[:success] - bench_data[bench_name] = JSON.parse(File.read result_json_path).tap do + bench_data[bench_name] = JSON.parse(File.read(result_json_path)).tap do |json| + json["command_line"] = cmd.shelljoin File.unlink(result_json_path) end else @@ -590,6 +591,7 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat # Print CSV and PNG file names puts puts "Output:" +puts out_json_path puts out_tbl_path if args.graph require_relative 'misc/graph' From 4ef0d71a06a8b9f38f7e8005b9207ef6e1acf98a Mon Sep 17 00:00:00 2001 From: Maxime Chevalier-Boisvert Date: Mon, 7 Oct 2024 12:21:19 -0400 Subject: [PATCH 2/2] Update run_benchmarks.rb Co-authored-by: Takashi Kokubun --- run_benchmarks.rb | 1 - 1 file changed, 1 deletion(-) diff --git a/run_benchmarks.rb b/run_benchmarks.rb index 13ab798..bf0ff1d 100755 --- a/run_benchmarks.rb +++ b/run_benchmarks.rb @@ -592,7 +592,6 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat puts puts "Output:" puts out_json_path -puts out_tbl_path if args.graph require_relative 'misc/graph' out_graph_path = output_path + ".png"