Sha256: d4bf55592e4549e8272bd15d3a6db4e80ed8b89ac0a33e9a73aef6585b69366c

Contents?: true

Size: 1.83 KB

Versions: 28

Compression:

Stored size: 1.83 KB

Contents

<h3>Hotspot Results</h3>
<p>Meta analysis of your metrics to find hotspots in your code.</p>
<br/>

<% if !@hotspots || @hotspots.size == 0 %>
No Hotspots were found.
<% elsif @hotspots && @hotspots.size > 0 %>

<% granularities = [:files, :classes, :methods] %>
<table>
<tr valign="top">
<% granularities.each do |granularity| %>
   <th width='33%'>
<%= granularity.to_s.capitalize %></th>
<% end %>
</tr>

<% items = [] %>
<% granularities.each_index do |index| %>
  <% granularity = granularities[index] %>
  <% items << @hotspots[granularity] %>
<% end %>

<% items_length = 0 %>
<% columns = [0, 1, 2] %>
<% while (items_length < items[0].length || items_length < items[1].length || items_length < items[2].length) do %>
    <tr  valign="top">
       <% columns.each do |column| %>
       <% item = items[column].length >= items_length ? items[column][items_length] : nil %>
       <% if item %>
       <td>
       <b>
          <%= display_location(item[:location], nil) %>
        </b>
        <% if item[:location].file_path %>
          <% file, line = item[:location].file_path.split(/:/) %>
          <% if per_file_data[file] %>
            <small>&laquo;
              <b><a href="<%= file.gsub(%r{/}, '_') %>.html<%= (line.nil? ? '' : "#line#{line}") %>">annotate</a></b>
            &raquo;</small>
          <% end %>
        <% end %>
        <br/><br/>
        <!-- TODO HOTSPOTS for metric fu nice metric_link method -->
        <% item[:details].each do |metric, info| %>
          <%#= metric_link(@stat, metric, h(metric.to_s.capitalize)) + ": " + h(info)%><br/>
          <%= "#{metric.to_s.capitalize}: #{info}" %><br/>
          <% end %>
          </td>
      <% else %>
      <td> &nbsp; </td>
      <% end %>
      <% end %>
      <% items_length += 1 %>
      </tr>
    <% end %>

</table>
<% end %>


<p>Generated on <%= Time.now.localtime %></p>

Version data entries

28 entries across 28 versions & 4 rubygems

Version Path
metric_fu-4.2.1 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.2.0 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.1.3 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.1.2 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.1.1 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.1.0 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-4.0.0 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-3.0.1 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-3.0.0 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.4.pre5 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.4.pre4 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.4.pre2 lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.4.pre lib/metric_fu/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.3.7.18.1 lib/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.3.7.19 lib/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.3.6 lib/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.3.5 lib/metrics/hotspots/template_awesome/hotspots.html.erb
metric_fu-2.1.3.4 lib/metrics/hotspots/template_awesome/hotspots.html.erb
bf4-metric_fu-2.1.3.4 lib/templates/awesome/hotspots.html.erb
bf4-metric_fu-2.1.3.3 lib/templates/awesome/hotspots.html.erb