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
4 def total_time
5   self.call_tree.total_time
6 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
 9 def wait_time
10   # wait_time, like self:time, is always method local
11   # thus we need to sum over all methods and call infos
12   self.methods.inject(0) do |sum, method_info|
13     method_info.callers.each do |call_tree|
14       sum += call_tree.wait_time
15     end
16     sum
17   end
18 end