Skip to content

Commit fad55f8

Browse files
committed
Extract method to explain the skipping logic
1 parent 2eeb2ff commit fad55f8

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

lib/results_table_builder.rb

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,8 +18,7 @@ def build
1818
format = build_format
1919

2020
@bench_names.each do |bench_name|
21-
# Skip this bench_name if we failed to get data for any of the executables.
22-
next unless @bench_data.all? { |(_k, v)| v[bench_name] }
21+
next unless has_complete_data?(bench_name)
2322

2423
row = build_row(bench_name)
2524
table << row
@@ -30,6 +29,10 @@ def build
3029

3130
private
3231

32+
def has_complete_data?(bench_name)
33+
@bench_data.all? { |(_k, v)| v[bench_name] }
34+
end
35+
3336
def build_header
3437
header = ["bench"]
3538

0 commit comments

Comments
 (0)