Permalink
Browse files

fixed a couple of hidden bugs

  • Loading branch information...
1 parent c401ad9 commit 09bd0eeefc5cb3c2cb26e17b486dd0965afbf4d5 @goncalossilva goncalossilva committed Mar 28, 2011
@@ -21,6 +21,7 @@ module Performance
def self.included(base)
base.superclass_delegating_accessor :profile_options
+ base.profile_options = {}
end
def full_profile_options
@@ -44,7 +45,7 @@ def run(result)
run_profile(klass.new)
result.add_run
else
- puts '%20s: unsupported' % @metric.name
+ puts '%20s: unsupported' % metric_name
end
end
end
@@ -10,7 +10,7 @@ module Testing
module Performance
DEFAULTS.merge!(
if ARGV.include?('--benchmark')
- ({:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time]}
+ {:metrics => [:wall_time, :memory, :objects, :gc_runs, :gc_time]}
else
{ :min_percent => 0.01,
:metrics => [:process_time, :memory, :objects],
@@ -1,5 +1,5 @@
begin
- require 'test-unit'
+ gem 'test-unit'
rescue LoadError
$stderr.puts 'Specify test-unit as application\'s dependency in Gemfile to run benchmarks.'
exit

0 comments on commit 09bd0ee

Please sign in to comment.