<% min_time = @options[:min_time] || (@options[:nonzero] ? 0.005 : nil)
methods.sort_by(&sort_method).reverse_each do |method|
total_percentage = (method.total_time/total_time) * 100
next if total_percentage < min_percent
next if min_time && method.total_time < min_time
self_percentage = (method.self_time/total_time) * 100 %>
<% for caller in method.aggregate_parents.sort_by(&:total_time)
next unless caller.parent
next if min_time && caller.total_time < min_time %>
|
|
<%= sprintf("%#{TIME_WIDTH}.2f", caller.total_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", caller.self_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", caller.wait_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", caller.children_time) %> |
<% called = "#{caller.called}/#{method.called}" %>
<%= sprintf("%#{CALL_WIDTH}s", called) %> |
<%= create_link(thread, total_time, caller.parent.target) %> |
<%= file_link(caller.parent.target.source_file, caller.line) %> |
<% end %>
<%= sprintf("%#{PERCENTAGE_WIDTH-1}.2f\%", total_percentage) %> |
<%= sprintf("%#{PERCENTAGE_WIDTH-1}.2f\%", self_percentage) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", method.total_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", method.self_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", method.wait_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", method.children_time) %> |
<%= sprintf("%#{CALL_WIDTH}i", method.called) %> |
<%= method.recursive? ? "*" : " "%><%= h method.full_name %>
|
<%= file_link(method.source_file, method.line) %> |
<% method.recalc_recursion unless method.non_recursive? %>
<% for callee in method.aggregate_children.sort_by(&:total_time).reverse %>
<% next if min_time && callee.total_time < min_time %>
|
|
<%= sprintf("%#{TIME_WIDTH}.2f", callee.total_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", callee.self_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", callee.wait_time) %> |
<%= sprintf("%#{TIME_WIDTH}.2f", callee.children_time) %> |
<% called = "#{callee.called}/#{callee.target.called}" %>
<%= sprintf("%#{CALL_WIDTH}s", called) %> |
<%= create_link(thread, total_time, callee.target) %> |
<%= file_link(method.source_file, callee.line) %> |
<% end %>
|
<% thread.recalc_recursion unless method.non_recursive? %>
<% end %>