Commit f3fee06b authored by Sami Evangelista's avatar Sami Evangelista
Browse files

benchmark script to geneerate state space graphs

parent 1f947e79
#!/bin/bash
TIMEOUT=600
OUT_DIR=out/stub/graphs
BASE_CMD="helena -t=27 --action=POR-GRAPH --time-limit=$TIMEOUT"
mkdir $OUT_DIR &> /dev/null
cat scripts/stub/instances | grep -v ^# | while IFS=';' read model instance
do
out_dir=$OUT_DIR/$model/$instance
mkdir -p $out_dir &> /dev/null
done_file=$out_dir/done
[ -e $done_file ] && continue
pnml=in/pnml/$model/$instance.pnml
tmp_dir=$(mktemp -d)
# generate the graph
cmd=$BASE_CMD" --model-directory=$tmp_dir $pnml"
echo $cmd
rows=$($cmd | wc -l)
echo $rows" sec."
# generate por relations
if [ $rows -lt $TIMEOUT ]
then
graph_file=$out_dir/graph.dat
por_file=$out_dir/por.dat
graph_file=$tmp_dir/por-graph.dat
cmd="helena-analyse-por-graph $graph_file $por_file"
echo $cmd
eval $cmd
fi
touch $done_file
rm -rf $tmp_dir
done
exit 0
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment