<commit_before>class Telegraf < Formula
  desc "Server-level metric gathering agent for InfluxDB"
  homepage "https://www.influxdata.com/"
  url "https://github.com/influxdata/telegraf/archive/v1.20.3.tar.gz"
  sha256 "cf8fd4d38970648281101e8a71b1a48c5765c8aaa9d67619c00272c9192e9057"
  license "MIT"
  head "https://github.com/influxdata/telegraf.git", branch: "master"

  livecheck do
    url :stable
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_monterey: "7d430403d0554b840fa56a6d1d716fa9aa4015fa569604c3a632ca07ef5cc6a1"
    sha256 cellar: :any_skip_relocation, arm64_big_sur:  "489a39af34f88d5c8f50a99cbcd059bee172b20b0313a483f97827993ce809e1"
    sha256 cellar: :any_skip_relocation, monterey:       "9600b01770417080eb0113292fa272d4bd897f7a47570ae1d257547e28242e4e"
    sha256 cellar: :any_skip_relocation, big_sur:        "fa7758f7e9ff4f1c9711d7bc759ec87d823e0724cc50d27d7c5cdddc24cc8301"
    sha256 cellar: :any_skip_relocation, catalina:       "8667728d8428ca082f0eb49209a46df40e090dcca50663626c15839bf83f92f1"
    sha256 cellar: :any_skip_relocation, mojave:         "eeaf93fdddb62667a3d79ebfc31863154f10ccd1c6298feee1e5b258d2d857cd"
    sha256 cellar: :any_skip_relocation, x86_64_linux:   "3096181c311720c730443b60b1393aff05909de2d055e9e7ced4cb8493aa77ff"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf"
    etc.install "etc/telegraf.conf" => "telegraf.conf"
  end

  def post_install
    # Create directory for additional user configurations
    (etc/"telegraf.d").mkpath
  end

  service do
    run [opt_bin/"telegraf", "-config", etc/"telegraf.conf", "-config-directory", etc/"telegraf.d"]
    keep_alive true
    working_dir var
    log_path var/"log/telegraf.log"
    error_log_path var/"log/telegraf.log"
  end

  test do
    (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config")
    system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test",
           "-input-filter", "cpu:mem"
  end
end
<commit_msg>telegraf: update 1.20.3 bottle.<commit_after>class Telegraf < Formula
  desc "Server-level metric gathering agent for InfluxDB"
  homepage "https://www.influxdata.com/"
  url "https://github.com/influxdata/telegraf/archive/v1.20.3.tar.gz"
  sha256 "cf8fd4d38970648281101e8a71b1a48c5765c8aaa9d67619c00272c9192e9057"
  license "MIT"
  head "https://github.com/influxdata/telegraf.git", branch: "master"

  livecheck do
    url :stable
    regex(/^v?(\d+(?:\.\d+)+)$/i)
  end

  bottle do
    sha256 cellar: :any_skip_relocation, arm64_big_sur: "f4bcd0c5cd11ba61ed4ee73ed884d4f026ef4b659600fb832e299f711da5324b"
    sha256 cellar: :any_skip_relocation, big_sur:       "09d0bed283ffc66e647027ec0f532ad575f21ea4197d1a825d51653306e47feb"
    sha256 cellar: :any_skip_relocation, catalina:      "8d41a6f1a4dd4411b711e0af072a403a291fdac187bab206fc2bac24bb13a085"
    sha256 cellar: :any_skip_relocation, x86_64_linux:  "872f328452ee4d58df51da0bfc68d87201804e5672fcf9f093ac3f34ca2d3b6b"
  end

  depends_on "go" => :build

  def install
    system "go", "build", *std_go_args, "-ldflags", "-X main.version=#{version}", "./cmd/telegraf"
    etc.install "etc/telegraf.conf" => "telegraf.conf"
  end

  def post_install
    # Create directory for additional user configurations
    (etc/"telegraf.d").mkpath
  end

  service do
    run [opt_bin/"telegraf", "-config", etc/"telegraf.conf", "-config-directory", etc/"telegraf.d"]
    keep_alive true
    working_dir var
    log_path var/"log/telegraf.log"
    error_log_path var/"log/telegraf.log"
  end

  test do
    (testpath/"config.toml").write shell_output("#{bin}/telegraf -sample-config")
    system "#{bin}/telegraf", "-config", testpath/"config.toml", "-test",
           "-input-filter", "cpu:mem"
  end
end

{'fraction_non_alphanumeric': 0.1189245087900724, 'fraction_numerical': 0.15537745604963807, 'mean_word_length': 4.623546511627907, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 7, 'https://': 6, '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': '3993706', 'n_tokens_mistral': 1905, 'n_tokens_neox': 1572, 'n_words': 236}