<commit_before>#!/bin/bash

board="$1"

echo -e "# Board: $board"
printf "# %-15s %-15s %-15s %-15s\n" \
    "time (sec)" "threads" "weight" "nblocks/thread"

for ((h=1; h < 9; h++))
do
    for ((w=1; w < 6; w++))
    do
	for ((r=1; r < 10; r++))
	do
	    t=`(/usr/bin/time -f%ereal ./search dynpsdd-$h-$r-1.$w \
		< $board) 2>&1 | grep "real" | awk -Fr '{ print $1 }'`
	    printf "  %-15.4f %-15d %-15.2f %-15d\n" $t $h "1.$w" $r

	done
    done
done<commit_msg>Get the average of multiple runs.<commit_after>#!/bin/bash

board="$1"
runs=25

echo -e "# $(date)"
echo -e "# $(uname -n -o -m -r)"
echo -e "# Board: $board"
printf "# %-15s %-15s %-15s %-15s\n" \
    "time (sec)" "threads" "weight" "nblocks/thread"

for ((h=1; h < 9; h++))
do
    for ((w=1; w < 6; w++))
    do
	for ((r=1; r < 10; r++))
	do
	    sum=0
	    for ((i=0; i < $runs; i++))
	    do
		t=`(/usr/bin/time -f%ereal ./search dynpsdd-$h-$r-1.$w \
		    < $board) 2>&1 | grep "real" | awk -Fr '{ print $1 }'`
		sum=$(echo "scale=5; $sum + $t" | bc)
	    done
	done
	t=$(echo "scale=5; $sum / $runs" | bc)
	printf "  %-15.4f %-15d %-15.2f %-15d\n" $t $h "1.$w" $r
    done
done
{'fraction_non_alphanumeric': 0.2667829119442023, 'fraction_numerical': 0.05928509154315606, 'mean_word_length': 2.366568914956012, 'pattern_counts': {'":': 0, '<': 12, '<?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': '5143141', 'n_tokens_mistral': 602, 'n_tokens_neox': 552, 'n_words': 149}