<commit_before>#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
require "newrelic_plugin"
require_relative "perfmon_metrics.rb"

module PerfmonAgent

  class Agent < NewRelic::Plugin::Agent::Base

    agent_config_options :local, :hostname, :countersfile, :debug, :testrun
    agent_guid "com.52projects.plugins.perfmon"
    agent_version "0.0.1"

    if !:hostname.empty? then agent_human_labels("Perfmon") { "#{hostname}" }
    elsif :local then agent_human_labels("Perfmon") { "#{Socket.gethostname}" }
    else abort("No hostname found or local is not set to true.") end
      
    def setup_metrics<commit_msg>Adds information about forking the plugin<commit_after>#!/usr/bin/env ruby
require "rubygems"
require "bundler/setup"
require "newrelic_plugin"
require_relative "perfmon_metrics.rb"

module PerfmonAgent

  class Agent < NewRelic::Plugin::Agent::Base

    agent_config_options :local, :hostname, :countersfile, :debug, :testrun

    # Change the following agent_guid if you fork and use this as your own plugin
    # Visit https://newrelic.com/docs/plugin-dev/ for more information
    agent_guid "com.52projects.plugins.perfmon"
    agent_version "0.0.1"

    if !:hostname.empty? then agent_human_labels("Perfmon") { "#{hostname}" }
    elsif :local then agent_human_labels("Perfmon") { "#{Socket.gethostname}" }
    else abort("No hostname found or local is not set to true.") end
      
    def setup_metrics
{'fraction_non_alphanumeric': 0.1125, 'fraction_numerical': 0.006944444444444444, 'mean_word_length': 4.607003891050583, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 1, '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': '2987408', 'n_tokens_mistral': 467, 'n_tokens_neox': 463, 'n_words': 121}