Skip to content

Commit 2d5232a

Browse files
committed
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.
1 parent 2ce877c commit 2d5232a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

run_benchmarks.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,8 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
295295
result = check_call(cmd.shelljoin, env: env, raise_error: false)
296296

297297
if result[:success]
298-
bench_data[bench_name] = JSON.parse(File.read result_json_path).tap do
298+
bench_data[bench_name] = JSON.parse(File.read(result_json_path)).tap do |json|
299+
json["command_line"] = cmd.shelljoin
299300
File.unlink(result_json_path)
300301
end
301302
else
@@ -590,6 +591,7 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
590591
# Print CSV and PNG file names
591592
puts
592593
puts "Output:"
594+
puts out_json_path
593595
puts out_tbl_path
594596
if args.graph
595597
require_relative 'misc/graph'

0 commit comments

Comments
 (0)