class RubyProf::Thread
def total_time
def total_time self.call_tree.total_time end
def wait_time
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