<commit_before>require 'puppet'
require 'yaml'
require 'pp'

begin
  require 'gmetric'
rescue LoadError => e
  Puppet.info "You need the `gmetric` gem to use the Ganglia report"
end

Puppet::Reports.register_report(:ganglia) do

  configfile = File.join([File.dirname(Puppet.settings[:config]), "ganglia.yaml"])
  raise(Puppet::ParseError, "Ganglia report config file #{configfile} not readable") unless File.exist?(configfile)
  config = YAML.load_file(configfile)
  GANGLIA_SERVER = config[:ganglia_server]
  GANGLIA_PORT = config[:ganglia_port]
<commit_msg>Removed stray pp require<commit_after>require 'puppet'
require 'yaml'

begin
  require 'gmetric'
rescue LoadError => e
  Puppet.info "You need the `gmetric` gem to use the Ganglia report"
end

Puppet::Reports.register_report(:ganglia) do

  configfile = File.join([File.dirname(Puppet.settings[:config]), "ganglia.yaml"])
  raise(Puppet::ParseError, "Ganglia report config file #{configfile} not readable") unless File.exist?(configfile)
  config = YAML.load_file(configfile)
  GANGLIA_SERVER = config[:ganglia_server]
  GANGLIA_PORT = config[:ganglia_port]

{'fraction_non_alphanumeric': 0.11806797853309481, 'fraction_numerical': 0.0, 'mean_word_length': 6.3618421052631575, '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': '1051600', 'n_tokens_mistral': 389, 'n_tokens_neox': 377, 'n_words': 91}