Profile Report



ColumnDescription
%selfThe percentage of time spent in this method, derived from self_time/total_time
cumulativeThe sum of the time spent in this method and all the methods listed above it.
totalThe time spent in this method and its children.
selfThe time spent in this method.
childrenThe time spent in this method's children.
callsThe number of times this method was called.
self/callThe average time spent per call in this method.
total/callThe average time spent per call in this method and its children.
nameThe name of the method.


<% for thread_id, methods in @result.threads %> <% end %>
Thread ID Total Time
<%= thread_id %> <%= thread_time(thread_id) %>
<% for thread_id, methods in @result.threads total_time = thread_time(thread_id) %>

Thread <%= thread_id %>

<% select_methods(methods).sort.reverse_each do |method| total_percentage = (method.total_time/total_time) * 100 next if total_percentage < min_percent self_percentage = (method.self_time/total_time) * 100 %> <% for caller in select_methods(method.aggregate_parents) %> <% called = "#{caller.called}/#{method.called}" %> <% end %> <% for callee in select_methods(method.children) %> <% called = "#{callee.called}/#{callee.target.called}" %> <% end %> <% end %>
<%= sprintf("%#{PERCENTAGE_WIDTH}s", "%Total") %> <%= sprintf("%#{PERCENTAGE_WIDTH}s", "%Self") %> <%= sprintf("%#{TIME_WIDTH}s", "Total") %> <%= sprintf("%#{TIME_WIDTH}s", "Self") %> <%= sprintf("%#{TIME_WIDTH}s", "Wait") %> <%= sprintf("%#{TIME_WIDTH+2}s", "Child") %> <%= sprintf("%#{CALL_WIDTH}s", "Calls") %> Name Line
    <%= 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) %><%= sprintf("%#{CALL_WIDTH}s", called) %> <%= create_link(thread_id, caller.target) %> <%= caller.line %>
<%= 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) %> <%= h method.full_name %> <%= method.line %>
    <%= 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) %><%= sprintf("%#{CALL_WIDTH}s", called) %> <%= create_link(thread_id, callee.target) %> <%= callee.line %>
<% end %>