<commit_before>class HerokuAwsRdsTest
  def self::pg_connection
    uri = URI.parse(ENV["DATABASE_URL"])
    options = {
      host: uri.host,
      port: uri.port,
      user: uri.user,
      password: <PASSWORD>,
      dbname: uri.path[1..-1]
    }
    options.merge!(Hash[URI.decode_www_form( uri.query )]) if uri.query

    PG::Connection.new(options)
  end

  class App < Sinatra::Base
    get '/' do
      HerokuAwsRdsTest.pg_connection.exec('select NOW() AS current_time').first["current_time"]
    end
  end
end<commit_msg>super dumb benchmark<commit_after>class HerokuAwsRdsTest
  def self::pg_connection
    uri = URI.parse(ENV["DATABASE_URL"])
    options = {
      host: uri.host,
      port: uri.port,
      user: uri.user,
      password: <PASSWORD>,
      dbname: uri.path[1..-1]
    }
    options.merge!(Hash[URI.decode_www_form( uri.query )]) if uri.query

    PG::Connection.new(options)
  end

  class App < Sinatra::Base
    get '/' do
      require 'benchmark'
      output = ""
      output << Benchmark.bm do |x|
        x.report("Query current time") { output << "#{HerokuAwsRdsTest.pg_connection.exec('select NOW() AS current_time').first["current_time"]}<br/>" }
      end.first.format("%n: user: %u system: %y total: %t real: %r")
      output
    end
  end
end
{'fraction_non_alphanumeric': 0.14363354037267081, 'fraction_numerical': 0.003105590062111801, 'mean_word_length': 2.894259818731118, 'pattern_counts': {'":': 0, '<': 12, '<?xml version=': 0, '>': 6, 'https://': 0, 'lorem ipsum': 0, 'www.': 2, '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': '5965720', 'n_tokens_mistral': 454, 'n_tokens_neox': 444, 'n_words': 92}