<commit_before>## send it to the backends
require '/opt/vacuumetrix/lib/SendGraphite.rb'
require '/opt/vacuumetrix/lib/SendGanglia.rb'

def Sendit(metricpath, metricvalue, metrictimestamp)
  unless $graphiteserver.empty?
#	puts metricpath + " " + metricvalue.to_s + " " + metrictimestamp.to_s 
  	SendGraphite metricpath, metricvalue, metrictimestamp 
  end

  unless $gmondserver.empty?
  	SendGanglia metricpath, metricvalue
  end

end<commit_msg>handle missing config variables as well as empty config variables<commit_after>## send it to the backends
require '/opt/vacuumetrix/lib/SendGraphite.rb'
require '/opt/vacuumetrix/lib/SendGanglia.rb'

def Sendit(metricpath, metricvalue, metrictimestamp)
  if !$graphiteserver.nil? and !$graphiteserver.empty?
#	puts metricpath + " " + metricvalue.to_s + " " + metrictimestamp.to_s 
  	SendGraphite metricpath, metricvalue, metrictimestamp 
  end

  if !$gmondserver.nil? and !$gmondserver.empty? 
	SendGanglia metricpath, metricvalue
  end

end
{'fraction_non_alphanumeric': 0.0967741935483871, 'fraction_numerical': 0.0, 'mean_word_length': 5.167701863354037, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '2826437', 'n_tokens_mistral': 353, 'n_tokens_neox': 338, 'n_words': 76}