Source: show | on GitHub
# File activesupport/lib/active_support/testing/performance.rb, line 282 282: def format(measurement) 283: if measurement < 1 284: '%d ms' % (measurement * 1000) 285: else 286: '%.2f sec' % measurement 287: end 288: end
# File activesupport/lib/active_support/testing/performance.rb, line 278 278: def measure 279: ::Time.now.to_f 280: end