class RubyProf::Thread
Public Instance Methods
total_time()
click to toggle source
Returns the total time this thread was executed.
# File lib/ruby-prof/thread.rb, line 4 def total_time self.call_tree.total_time end
wait_time()
click to toggle source
Returns the amount of time this thread waited while other thread executed.
# File lib/ruby-prof/thread.rb, line 9 def wait_time # wait_time, like self:time, is always method local # thus we need to sum over all methods and call infos self.methods.inject(0) do |sum, method_info| method_info.callers.each do |call_tree| sum += call_tree.wait_time end sum end end