module Benchmark::IPS::Helpers

def scale(value)

def scale(value)
  scale = (Math.log10(value) / 3).to_i 
  scale = 0 if scale < 0 || scale >= SUFFIXES.size
  suffix = SUFFIXES[scale]
  scaled_value = value.to_f / (1000 ** scale)
  "%10.3f#{suffix}" % scaled_value
end