<commit_before>#!/bin/bash
# -----------------------------------------
# This is a watch dog function for bro.
# In case bro hangs, need to restart it.
# -----------------------------------------

TOTAL_RETRIES=3
SLEEP_TIMEOUT=10
CPU_THRESHOLD=99

# there should be updated logs in log file
MMIN="-10"

FILE=/blog/current/conn.log

brofish_ping() {
  RESULT=$(find $FILE -mmin ${MMIN} 2>/dev/null)
  if [[ -e $FILE && "x$RESULT" == "x" ]]; then
    return 1
  else
    return 0
  fi
}

brofish_cpu() {
  # Get CPU% from top
  RESULT=$(top -bn1 -p$(cat /blog/current/.pid) |grep bro|awk '{print $9}')
<commit_msg>update thresholds in brofish-ping<commit_after>#!/bin/bash
# -----------------------------------------
# This is a watch dog function for bro.
# In case bro hangs, need to restart it.
# -----------------------------------------

TOTAL_RETRIES=3
SLEEP_TIMEOUT=10
CPU_THRESHOLD=80

# there should be updated logs in log file
MMIN="-15"

FILE=/blog/current/conn.log

brofish_ping() {
  RESULT=$(find $FILE -mmin ${MMIN} 2>/dev/null)
  if [[ -e $FILE && "x$RESULT" == "x" ]]; then
    return 1
  else
    return 0
  fi
}

brofish_cpu() {
  # Get CPU% from top
  RESULT=$(top -bn1 -p$(cat /blog/current/.pid) |grep bro|awk '{print $9}')

{'fraction_non_alphanumeric': 0.26768488745980706, 'fraction_numerical': 0.01929260450160772, 'mean_word_length': 2.0440097799511, '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': '2937470', 'n_tokens_mistral': 455, 'n_tokens_neox': 428, 'n_words': 125}