lib/ruby-prof/thread.rb in ruby-prof-0.15.9 vs lib/ruby-prof/thread.rb in ruby-prof-0.16.0
- old
+ new
@@ -24,7 +24,18 @@
end
end
sum
end
end
+
+ 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.call_infos.each do |call_info|
+ sum += call_info.wait_time
+ end
+ sum
+ end
+ end
end
end