<% max = @output.map {|r| r[:samples] }.compact.max; padding = Math.log10(max).ceil + 1; %>
        <% @output.each_with_index do |line, idx| %>
<%= sprintf('% *d', padding, line[:samples]) if line[:samples].present? %>
<% end %>
        <% @output.each do |line| %>
<%= line[:code] -%>
        <% end %>