Adding stat model

This commit is contained in:
Daniel Lemire 2018-12-24 15:13:26 -05:00
parent 2d5783dae7
commit 9b27ffbd86
1 changed files with 31 additions and 0 deletions

31
scripts/statisticalmodel.sh Executable file
View File

@ -0,0 +1,31 @@
#!/bin/bash
SCRIPTPATH="$( cd "$(dirname "$0")" ; pwd -P )"
cd $SCRIPTPATH/..
datadirectory=$SCRIPTPATH/modeldata/$(uname -n)
mkdir -p $datadirectory
os=$(uname)
if [ "$os" = "Linux" ]; then
echo "You are using linux."
echo "We are going to just parse using simdjson, and collect perf stats."
make statisticalmodel
myfile=$datadirectory"/modeltable.txt"
echo $myfile
echo "" > $myfile
for i in $SCRIPTPATH/../jsonexamples/*.json; do
[ -f "$i" ] || break
echo $i
echo "#"$i >> "$myfile"
$SCRIPTPATH/../statisticalmodel "$i" >> "$myfile"
done
echo "see results in "$myfile
else
echo "Linux not detected"
fi