<commit_before>make buildall

make runall

${start} > rawRes
for((i=0; i < ${#runners[@]}; i++));
do
    ${runners[i]} >> rawRes
done<commit_msg>made script<commit_after>
if [ $# -ne 1 ]; then echo -e "Usage is sh $0 <correctresult>"; exit 1; fi

echo "Compiling..."
#make buildall

runners=( "./fs.exe"\
	"./cpp"\
	"./rkt"\
	"mono ./cs.exe"\
	"java jv"\
	"./hs"\
	"./ml"\
	"./lisp"\
	"./rs"\
	"./go"\
	"./d"\
	"./nim"\
	"luajit lj.lua"\
	"home/jonathan/projects/LPATHBench/jdk1.8.0_06/bin/java jv")

echo "Running..."

start=""
#${start} > rawRes
for((i=0; i < ${#runners[@]}; i++));
do
    echo 'yolo'
#    ${runners[i]} >> rawRes
done

filterStringPartOne='$2 == "LANGUAGE" && $1 == '
filterStringPartTwo=$1
filterStringPartThree=' { print $3 " " $4 }' 
awkCmd=$filterStringPartOne$filterStringPartTwo$filterStringPartThree 

echo $awkCmd > filterString.awk

awk -f filterString.awk ./rawRes > ./filteredRes

sort -k 2 -n ./filteredRes > ./sortedRes

echo '<html><head></head><body><table style="width: 100%" border="1" cellspacing="1" cellpadding="1">'
echo '<th style="width: 60%">Language</th><th style="width: 40%">Runtime (ms)</th>'
echo '{print "<tr><td>"$1"</td><td>"$2"</td></tr>"}' > ./tmp.awk
awk -E tmp.awk ./sortedRes
echo '</table></body></html>'
{'fraction_non_alphanumeric': 0.24960380348652933, 'fraction_numerical': 0.022187004754358162, 'mean_word_length': 3.93359375, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 32, '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': '7265061', 'n_tokens_mistral': 529, 'n_tokens_neox': 510, 'n_words': 114}