@@ -211,7 +211,7 @@ def sort_benchmarks(bench_names)
211
211
end
212
212
213
213
# Run all the benchmarks and record execution times
214
- def run_benchmarks ( ruby :, ruby_description :, categories :, name_filters :, out_path :, harness :, pre_init :, no_pinning :)
214
+ def run_benchmarks ( name : , ruby :, ruby_description :, categories :, name_filters :, out_path :, harness :, pre_init :, no_pinning :)
215
215
bench_data = { }
216
216
217
217
# Get the list of benchmark files/directories matching name filters
@@ -276,6 +276,11 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
276
276
end
277
277
end
278
278
279
+ if name == "mutable"
280
+ cmd = [ "env" , "MUTABLE_STRINGS=true" , *cmd ]
281
+ # env["MUTABLE_STRINGS"] = "true"
282
+ end
283
+
279
284
# Do the benchmarking
280
285
check_call ( cmd . shelljoin , env : env )
281
286
@@ -392,19 +397,17 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
392
397
end
393
398
end . parse!
394
399
400
+ args . categories = [ "headline" ]
401
+
395
402
# Remaining arguments are treated as benchmark name filters
396
403
if ARGV . length > 0
397
404
args . name_filters += ARGV
398
405
end
399
406
400
407
# If -e is not specified, benchmark the current Ruby. Compare it with YJIT if available.
401
408
if args . executables . empty?
402
- if have_yjit? ( RbConfig . ruby )
403
- args . executables [ "interp" ] = [ RbConfig . ruby ]
404
- args . executables [ "yjit" ] = [ RbConfig . ruby , "--yjit" , *args . yjit_opts . shellsplit ]
405
- else
406
- args . executables [ "ruby" ] = [ RbConfig . ruby ]
407
- end
409
+ args . executables [ "mutable" ] = [ RbConfig . ruby , "--yjit" , *args . yjit_opts . shellsplit ]
410
+ args . executables [ "frozen" ] = [ RbConfig . ruby , "--yjit" , *args . yjit_opts . shellsplit ]
408
411
end
409
412
410
413
# Disable CPU frequency scaling
@@ -426,6 +429,7 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
426
429
bench_data = { }
427
430
args . executables . each do |name , executable |
428
431
bench_data [ name ] = run_benchmarks (
432
+ name : name ,
429
433
ruby : executable ,
430
434
ruby_description : ruby_descriptions [ name ] ,
431
435
categories : args . categories ,
0 commit comments