<commit_before>-module(riaknostic).
-export([main/1]).

main(Config) ->
  application:load(riaknostic),

  io:format("Fetching riak data...~n"),
  Ping = net_adm:ping('riaksearch@127.0.0.1'),
  case Ping of
      pang ->
        io:format("Couldn't reach the local Riak node.~n");

      pong ->
        [Node|_] = nodes(),
        RiakData = rpc:call(Node, riak_kv_stat, get_stats, []),
        io:format("~s~n", [RiakData])
  end,
  {ok, Modules} = application:get_env(riaknostic, modules),
  Runner = fun(ModuleName) ->
      Module = list_to_atom("riaknostic_" ++ ModuleName),
      Module:handle_command({riak_home, "/usr/lib64/riak"})
  end,
  lists:foreach(Runner, Modules),
  application:start(riaknostic, permanent).<commit_msg>Remove io:format that's broken anyway.<commit_after>-module(riaknostic).
-export([main/1]).

main(Config) ->
  application:load(riaknostic),

  io:format("Fetching riak data...~n"),
  Ping = net_adm:ping('riaksearch@127.0.0.1'),
  case Ping of
      pang ->
        io:format("Couldn't reach the local Riak node.~n");

      pong ->
        [Node|_] = nodes(),
        RiakData = rpc:call(Node, riak_kv_stat, get_stats, []),
  end,

  {ok, Modules} = application:get_env(riaknostic, modules),
  Runner = fun(ModuleName) ->
      Module = list_to_atom("riaknostic_" ++ ModuleName),
      Module:handle_command({riak_home, "/usr/lib64/riak"})
  end,
  lists:foreach(Runner, Modules),
  application:start(riaknostic, permanent).
{'fraction_non_alphanumeric': 0.17031463748290013, 'fraction_numerical': 0.012311901504787962, 'mean_word_length': 3.765472312703583, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 11, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 2, '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': '7347558', 'n_tokens_mistral': 561, 'n_tokens_neox': 536, 'n_words': 91}