<commit_before>#!/bin/zsh
NGINX_OPT=( -p ./ -c ./nginx.conf )
VALGRIND_OPT=( --trace-children=yes --track-fds=no --track-origins=yes )
WORKERS=5
NGINX_DAEMON="off"
NGINX_CONF="working_directory \"`pwd`\"; "
for opt in $*; do
  case $opt in
    leak|leakcheck)
      VALGRIND_OPT+=("--leak-check=full")
      ;;
    valgrind)
      valgrind=1
      ;;
    worker|1|one|single) 
      WORKERS=1
      ;;
    debug|kdbg)
      WORKERS=1
      NGINX_DAEMON="on"
      debugger=1
      ;;
  esac
done
NGINX_CONF="worker_processes $WORKERS; daemon $NGINX_DAEMON; $NGINX_CONF"
NGINX_OPT+=( -g "$NGINX_CONF" )
#echo $NGINX_CONF
#echo $NGINX_OPT
echo "nginx $NGINX_OPT"

if [[ $debugger == 1 ]]; then<commit_msg>more verbose leakcheck stuff for valgrind<commit_after>#!/bin/zsh
NGINX_OPT=( -p ./ -c ./nginx.conf )
VALGRIND_OPT=( --trace-children=yes --track-fds=no --track-origins=yes )
WORKERS=5
NGINX_DAEMON="off"
NGINX_CONF="working_directory \"`pwd`\"; "
for opt in $*; do
  case $opt in
    leak|leakcheck)
      VALGRIND_OPT+=("--leak-check=full" "--show-leak-kinds=all")
      ;;
    valgrind)
      valgrind=1
      ;;
    worker|1|one|single) 
      WORKERS=1
      ;;
    debug|kdbg)
      WORKERS=1
      NGINX_DAEMON="on"
      debugger=1
      ;;
  esac
done
NGINX_CONF="worker_processes $WORKERS; daemon $NGINX_DAEMON; $NGINX_CONF"
NGINX_OPT+=( -g "$NGINX_CONF" )
#echo $NGINX_CONF
#echo $NGINX_OPT
echo "nginx $NGINX_OPT"

if [[ $debugger == 1 ]]; then
{'fraction_non_alphanumeric': 0.16255144032921812, 'fraction_numerical': 0.009602194787379973, 'mean_word_length': 3.180515759312321, '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': '6090594', 'n_tokens_mistral': 645, 'n_tokens_neox': 627, 'n_words': 107}