<commit_before>class HelloWorldController < ActionController::Metal
  include ActionController::Rendering
  include ActionController::Renderers::All

  def json
    render :json => {:message => "Hello, World!"}
  end

  def db
    queries = (params[:queries] || 1).to_i

    results = (1..queries).map do
      # get a random row from the database, which we know has 10000
      # rows with ids 1 - 10000
      World.find(Random.rand(10000) + 1)
    end
    render :json => results
  end
end
<commit_msg>verify Fixed rails-strepped's db test<commit_after>class HelloWorldController < ActionController::Metal
  include ActionController::Rendering
  include ActionController::Renderers::All

  def json
    render :json => {:message => "Hello, World!"}
  end

  def db
    queries = (params[:queries] || 1).to_i

    if queries > 1
      results = (1..queries).map do
        # get a random row from the database, which we know has 10000
        # rows with ids 1 - 10000
        World.find(Random.rand(10000) + 1)
      end
    else
      results = World.find(Random.rand(10000) + 1)
    end
    
    render :json => results
  end
end

{'fraction_non_alphanumeric': 0.10317460317460317, 'fraction_numerical': 0.03968253968253968, 'mean_word_length': 2.913793103448276, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 10, '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': '1459070', 'n_tokens_mistral': 381, 'n_tokens_neox': 335, 'n_words': 108}