<% @top_locations.each do |location| -%> <% item = @totals[location] path, line_number, method = location.split(':') this_bar = bar_value(@report_options[:sort], item) bar_width = 100 * this_bar / @max_bar_value -%> <% end -%>
Location <%= report_column_header_link(ActiveRecordProfiler::Collector::DURATION, @report_options[:sort], 'Total Duration (s)', params) %> <%= report_column_header_link(ActiveRecordProfiler::Collector::COUNT, @report_options[:sort], 'Count', params) %> <%= report_column_header_link(ActiveRecordProfiler::Collector::AVG_DURATION, @report_options[:sort], 'Avg. Duration (ms)', params) %> <%= report_column_header_link(ActiveRecordProfiler::Collector::LONGEST, @report_options[:sort], 'Max. Duration (ms)', params) %> SQL for Max Duration
<%= link_to_if(@report_options[:link_location], location_description(path, line_number), "#", :class => 'source-link', :data => {file: path, line: line_number}) %>
<%= number_with_precision(item[ActiveRecordProfiler::Collector::DURATION], :precision => 3) %> <%= number_with_delimiter(item[ActiveRecordProfiler::Collector::COUNT]) %> <%= number_with_precision(item[ActiveRecordProfiler::Collector::DURATION] / item[ActiveRecordProfiler::Collector::COUNT] * 1000, :precision => 3) %> <%= number_with_precision(item[ActiveRecordProfiler::Collector::LONGEST] * 1000, :precision => 3) %> <%= item[ActiveRecordProfiler::Collector::LONGEST_SQL] %>