@@ -208,6 +208,7 @@ def sort_benchmarks(bench_names)
208
208
def run_benchmarks ( ruby :, ruby_description :, categories :, name_filters :, out_path :, harness :, pre_init :, rss :, no_pinning :)
209
209
bench_times = { }
210
210
bench_rss = { }
211
+ bench_data = { }
211
212
212
213
# Get the list of benchmark files/directories matching name filters
213
214
bench_files = Dir . children ( 'benchmarks' ) . sort . filter do |entry |
@@ -281,11 +282,14 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
281
282
# Convert RSS to MiB
282
283
bench_rss [ bench_name ] = out_data [ "rss" ] / 1024.0 / 1024.0
283
284
end
285
+
284
286
# Convert times to ms
285
287
bench_times [ bench_name ] = out_data [ "values" ] . map { |v | 1000 * Float ( v ) }
288
+
289
+ bench_data [ bench_name ] = out_data
286
290
end
287
291
288
- return bench_times , bench_rss
292
+ return bench_times , bench_rss , bench_data
289
293
end
290
294
291
295
# Default values for command-line arguments
@@ -402,8 +406,9 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
402
406
bench_start_time = Time . now . to_f
403
407
bench_times = { }
404
408
bench_rss = { }
409
+ bench_data = { }
405
410
args . executables . each do |name , executable |
406
- bench_times [ name ] , bench_rss [ name ] = run_benchmarks (
411
+ bench_times [ name ] , bench_rss [ name ] , bench_data [ name ] = run_benchmarks (
407
412
ruby : executable ,
408
413
ruby_description : ruby_descriptions [ name ] ,
409
414
categories : args . categories ,
@@ -481,6 +486,7 @@ def run_benchmarks(ruby:, ruby_description:, categories:, name_filters:, out_pat
481
486
metadata : ruby_descriptions ,
482
487
}
483
488
out_data [ :rss ] = bench_rss if args . rss
489
+ out_data [ :raw_data ] = bench_data
484
490
out_data . merge! ( bench_times )
485
491
json_str = JSON . generate ( out_data )
486
492
file . write json_str
0 commit comments