Method: LabTech::Summary::SpeedupLine#to_s
- Defined in:
- app/models/lab_tech/summary/speedup_line.rb
#to_s ⇒ Object
15 16 17 18 19 20 21 22 23 24 25 26 27 |
# File 'app/models/lab_tech/summary/speedup_line.rb', line 15 def to_s highlight = ( n == 50 ) # Only 'highlight' (add dots to) the median line label = "%3d%%" % n speedup_factor = LabTech::Percentile.call(n, @speedup_factors) rel_speedup = "%+.1fx" % speedup_factor = ( speedup_factor, speedup_magnitude, highlight: highlight) speedup_cue = pad_left( rel_speedup, speedup_width ) speedup_cue += " faster" if speedup_factor > 0 "#{label} #{bar} #{speedup_cue}" end |