Profile Report

<%= @result.measure_mode_string.capitalize %>

<%= Time.now.strftime(self.time_format) %>
<% for thread in @result.threads %> <% end %>
Thread ID Fiber ID Total
<%= thread.id %> <%= thread.fiber_id %> <%= thread.total_time %>
<% for thread in @result.threads methods = thread.methods total_time = thread.total_time %>

Thread <%= thread.id %>, Fiber: <%= thread.fiber_id %>

<% if @result.track_allocations? %> <% end %> <% min_time = @options[:min_time] || (@options[:nonzero] ? 0.005 : nil) sorted_methods = sort_method ? methods.sort_by(&sort_method) : methods.sort sorted_methods.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.call_trees.callers.sort next if min_time && caller.total_time < min_time %> <% if @result.track_allocations? %> <% end %> <% end %> <% if @result.track_allocations? %> <% end %> <% if @result.track_allocations? %> <% end %> <% for callee in method.call_trees.callees.sort_by(&:total_time).reverse next if min_time && callee.total_time < min_time %> <% if @result.track_allocations? %> <% end %> <% end %> <% end %>
%Total %Self Total Self Wait Child Calls NameAllocationsLine
    <%= sprintf("%.2f", caller.total_time) %> <%= sprintf("%.2f", caller.self_time) %> <%= sprintf("%.2f", caller.wait_time) %> <%= sprintf("%.2f", caller.children_time) %> <%= "#{caller.called}/#{method.called}" %> <%= create_link(thread, total_time, caller.parent.target) %>-<%= if caller.parent.target.source_file file_link(caller.parent.target.source_file, caller.line) end %>
<%= sprintf("%.2f%%", total_percentage) %> <%= sprintf("%.2f%%", self_percentage) %> <%= sprintf("%.2f", method.total_time) %> <%= sprintf("%.2f", method.self_time) %> <%= sprintf("%.2f", method.wait_time) %> <%= sprintf("%.2f", method.children_time) %> <%= sprintf("%i", method.called) %> <%= method.recursive? ? "*" : " " %><%= h method.full_name %> <% count = method.allocations.reduce(0) do |size, allocation| size += allocation.count end %> <% if count > 0 %> <%= count %> <% else %> 0 <% end %> <%= if method.source_file file_link(method.source_file, method.line) end %>
<% for allocation in method.allocations %> <% end %>
    <%= sprintf("%.2f", callee.total_time) %> <%= sprintf("%.2f", callee.self_time) %> <%= sprintf("%.2f", callee.wait_time) %> <%= sprintf("%.2f", callee.children_time) %> <%= "#{callee.called}/#{callee.target.called}" %> <%= create_link(thread, total_time, callee.target) %>-<%= file_link(callee.source_file, callee.line) %>
* indicates recursively called methods
<% end %>