<commit_before>#!/bin/bash
# user data for benchmark: UnixBench

if [ -e ~/unixbench_finished ]; then
  exit
fi

TRIED=0
IDESC=`cat /var/local/instance_name`
mkdir -p ~/log
echo "*** Starting UnixBench on \"$IDESC\"..."
while [ $TRIED -lt $# ]
do
  cd ~/UnixBench/
  ./Run &> ~/log/${IDESC}_${TRIED}.log
  python ~/upload_log.py $IDESC $TRIED
  TRIED=`expr $TRIED + 1`
  echo $TRIED > ~/unixbench_tried
  echo "*** UnixBench trial $TRIED finished!"
done

# halt
echo '*** Benchmarking script completed, now halting the system...'
env TZ='America/Los_Angeles' date > ~/unixbench_finished
halt<commit_msg>Multiple trial fix<commit_after>#!/bin/bash
# user data for benchmark: UnixBench

if [ -e ~/unixbench_finished ]; then
  exit
fi

TRIED=0
IDESC=`cat /var/local/instance_name`
mkdir -p ~/log
echo "*** Starting UnixBench on \"$IDESC\"..."
while [ $TRIED -lt $1 ]
do
  echo "*** UnixBench trial $TRIED started!"
  cd ~/UnixBench/
  ./Run &> ~/log/${IDESC}_${TRIED}.log
  python ~/upload_log.py $IDESC $TRIED
  echo "*** UnixBench trial $TRIED finished!"
  TRIED=`expr $TRIED + 1`
  echo $TRIED > ~/unixbench_tried
done

# halt
echo '*** Benchmarking script completed, now halting the system...'
env TZ='America/Los_Angeles' date > ~/unixbench_finished
halt
{'fraction_non_alphanumeric': 0.1624203821656051, 'fraction_numerical': 0.003980891719745223, 'mean_word_length': 3.9683794466403164, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 9, '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': '4686781', 'n_tokens_mistral': 521, 'n_tokens_neox': 482, 'n_words': 129}