<commit_before><table class="table queries">
  <thead>
    <tr>
      <th style="width: 10%;">Pid</th>
      <th style="width: 10%;">State</th>
      <th style="width: 15%;">Duration</th>
      <th>Source</th>
      <th style="width: 25%;"></th>
    </tr>
  </thead>
  <tbody>
    <% now = Time.now %>
    <% queries.each do |query| %>
      <tr>
        <td><%= query["pid"] %></td>
        <td><%= query["state"] %></td>
        <td><%= query["started_at"] ? "#{number_with_delimiter(((now - Time.parse(query["started_at"])) * 1000).round)} ms" : nil %></td>
        <td><%= query["source"] %> <span class="text-muted"><%= query["user"] %></span></td>
        <td class="text-right">
          <%= button_to "Explain", explain_path(query: query["query"]), form: {target: "_blank"}, class: "btn btn-info" %>
          <%= button_to "Kill", kill_path(pid: query["pid"]), class: "btn btn-danger" %>
        </td>
      </tr>
      <tr>
        <td colspan="6" style="border-top: none; padding: 0;"><pre><%= query["query"] %></pre></td>
      </tr>
    <% end %><commit_msg>Use button params when possible - #60<commit_after><table class="table queries">
  <thead>
    <tr>
      <th style="width: 10%;">Pid</th>
      <th style="width: 10%;">State</th>
      <th style="width: 15%;">Duration</th>
      <th>Source</th>
      <th style="width: 25%;"></th>
    </tr>
  </thead>
  <tbody>
    <% now = Time.now %>
    <% queries.each do |query| %>
      <tr>
        <td><%= query["pid"] %></td>
        <td><%= query["state"] %></td>
        <td><%= query["started_at"] ? "#{number_with_delimiter(((now - Time.parse(query["started_at"])) * 1000).round)} ms" : nil %></td>
        <td><%= query["source"] %> <span class="text-muted"><%= query["user"] %></span></td>
        <td class="text-right">
          <% button_path, button_options = Rails.version >= "4.1" ? [explain_path, {params: {query: query["query"]}}] : [explain_path(query: query["query"]), {}] %>
          <%= button_to "Explain", button_path, button_options.merge(form: {target: "_blank"}, class: "btn btn-info") %>
          <%= button_to "Kill", kill_path(pid: query["pid"]), class: "btn btn-danger" %>
        </td>
      </tr>
      <tr>
        <td colspan="6" style="border-top: none; padding: 0;"><pre><%= query["query"] %></pre></td>
      </tr>
    <% end %>
{'fraction_non_alphanumeric': 0.2552552552552553, 'fraction_numerical': 0.013728013728013728, 'mean_word_length': 2.94585448392555, 'pattern_counts': {'":': 0, '<': 98, '<?xml version=': 0, '>': 99, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '409860', 'n_tokens_mistral': 894, 'n_tokens_neox': 814, 'n_words': 172}