Permalink
Browse files

don't set cpu_frequency if RubyProf resolved it

  • Loading branch information...
1 parent bf6661c commit 381a30fbba6ccca0bf2e7e2bc007ea5e6848af62 @goncalossilva goncalossilva committed with wycats Jun 12, 2010
Showing with 2 additions and 2 deletions.
  1. +2 −2 activesupport/lib/active_support/testing/performance.rb
@@ -319,7 +319,7 @@ class CpuTime < Time
def initialize(*args)
# FIXME: yeah my CPU is 2.33 GHz
- RubyProf.cpu_frequency = 2.33e9
+ RubyProf.cpu_frequency = 2.33e9 unless RubyProf.cpu_frequency > 0
super
end
@@ -452,4 +452,4 @@ def format(measurement)
end
end
rescue LoadError
-end
+end

0 comments on commit 381a30f

Please sign in to comment.