class ActiveSupport::Testing::Performance::Metrics::CpuTime
Constants
- Mode
Public Class Methods
new(*args)
click to toggle source
Calls superclass method
ActiveSupport::Testing::Performance::Metrics::Base.new
# File lib/active_support/testing/performance/ruby.rb, line 114 def initialize(*args) # FIXME: yeah my CPU is 2.33 GHz RubyProf.cpu_frequency = 2.33e9 unless RubyProf.cpu_frequency > 0 super end
Public Instance Methods
measure()
click to toggle source
# File lib/active_support/testing/performance/jruby.rb, line 84 def measure ManagementFactory.thread_mx_bean.get_current_thread_cpu_time / 1000 / 1000 / 1000.0 # seconds end