lib/benchmark_driver/output/markdown.rb in benchmark_driver-0.16.3 vs lib/benchmark_driver/output/markdown.rb in benchmark_driver-0.16.4
- old
+ new
@@ -131,16 +131,12 @@
$stdout.print("|", " " * (@name_length + 2))
@job_context_result.each do |context, result|
if context == worst
result = '-'
else
- result = result.values.first[1]
- if order == :min_by
- result = result.fdiv(worst_result)
- else
- result = best_result.fdiv(worst_result)
- end
- result = sprintf("%.2fx", result)
+ val = result.values.first[1]
+ ratio = val.fdiv(worst_result)
+ result = sprintf("%.2fx", ratio)
end
length = [context.name.length, NAME_LENGTH].max
$stdout.printf("|%*s", length, result)
end
$stdout.puts('|')