diff options
author | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-28 04:19:39 +0100 |
---|---|---|
committer | Gonçalo Silva <goncalossilva@gmail.com> | 2011-03-28 04:19:39 +0100 |
commit | 726b7ede54031eecfcee34eec80040553e9ad19f (patch) | |
tree | 1e4da2700e3fa2b5f459d7ec3e0222a9ba75cb36 /activesupport/lib/active_support/testing/performance.rb | |
parent | 09bd0eeefc5cb3c2cb26e17b486dd0965afbf4d5 (diff) | |
download | rails-726b7ede54031eecfcee34eec80040553e9ad19f.tar.gz rails-726b7ede54031eecfcee34eec80040553e9ad19f.tar.bz2 rails-726b7ede54031eecfcee34eec80040553e9ad19f.zip |
improved detection and feedback of supported/unsupported metrics
Diffstat (limited to 'activesupport/lib/active_support/testing/performance.rb')
-rw-r--r-- | activesupport/lib/active_support/testing/performance.rb | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/activesupport/lib/active_support/testing/performance.rb b/activesupport/lib/active_support/testing/performance.rb index 495fcea381..f6945e8466 100644 --- a/activesupport/lib/active_support/testing/performance.rb +++ b/activesupport/lib/active_support/testing/performance.rb @@ -235,44 +235,13 @@ module ActiveSupport end end - class ProcessTime < Time - # overridden by each implementation - def measure; end - end - - class WallTime < Time - # overridden by each implementation - def measure; end - end - - class CpuTime < Time - # overridden by each implementation - def measure; end - end - - class Memory < Base - # overridden by each implementation - def measure; end - + class DigitalInformationUnit < Base def format(measurement) number_to_human_size(measurement, :precision => 2) end end - class Objects < Amount - # overridden by each implementation - def measure; end - end - - class GcRuns < Amount - # overridden by each implementation - def measure; end - end - - class GcTime < Time - # overridden by each implementation - def measure; end - end + # each implementation provides its own metrics like ProcessTime, Memory or GcRuns end end end |