<commit_before>require 'poolboy/screen'
require 'poolboy/version'
require 'poolboy/mysql'
require 'poolboy/five_five'
require 'poolboy/five_one'
require 'optparse'
require 'yaml'
require 'curses'

module Poolboy

  def Poolboy.execute
    options = YAML.load(File.read(ENV['HOME']+'/.poolboy.yaml')) rescue {}

    o = OptionParser.new do |opts|
      opts.banner = "Poolboy helps you inspect your buffer pool\n\nUsage: poolboy [options]"
      opts.on("-h HOST", "MySQL hostname") do |h|
        options[:host] = h
      end
      opts.on("-u USER", "MySQL username") do |u|
        options[:username] = u
      end
      opts.on("-p PASSWORD", "MySQL password") do |p|
        options[:password] = p
      end
      opts.on("-r REFRESH", Integer, "Refresh interval") do |r|
        options[:refresh] = r >= 1 ? r : 1
      end<commit_msg>Pass in the socket on the command line<commit_after>require 'poolboy/screen'
require 'poolboy/version'
require 'poolboy/mysql'
require 'poolboy/five_five'
require 'poolboy/five_one'
require 'optparse'
require 'yaml'
require 'curses'

module Poolboy

  def Poolboy.execute
    options = YAML.load(File.read(ENV['HOME']+'/.poolboy.yaml')) rescue {}

    o = OptionParser.new do |opts|
      opts.banner = "Poolboy helps you inspect your buffer pool\n\nUsage: poolboy [options]"
      opts.on("-h HOST", "MySQL hostname") do |h|
        options[:host] = h
      end
      opts.on("-u USER", "MySQL username") do |u|
        options[:username] = u
      end
      opts.on("-p PASSWORD", "MySQL password") do |p|
        options[:password] = p
      end
      opts.on("-r REFRESH", Integer, "Refresh interval") do |r|
        options[:refresh] = r >= 1 ? r : 1
      end
      opts.on("-s SOCKET", "MySQL socket") do |s|
        options[:socket] = s
      end
{'fraction_non_alphanumeric': 0.1443701226309922, 'fraction_numerical': 0.002229654403567447, 'mean_word_length': 2.9192139737991267, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 5, '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': '5850239', 'n_tokens_mistral': 602, 'n_tokens_neox': 599, 'n_words': 169}