|
From: <chr...@us...> - 2012-02-24 12:49:58
|
Revision: 3567
http://dlvhex.svn.sourceforge.net/dlvhex/?rev=3567&view=rev
Author: chrisr86
Date: 2012-02-24 12:49:47 +0000 (Fri, 24 Feb 2012)
Log Message:
-----------
update benchmark script
Modified Paths:
--------------
dlvhex/branches/dlvhex-refactoring/examples/benchmark.sh
Modified: dlvhex/branches/dlvhex-refactoring/examples/benchmark.sh
===================================================================
--- dlvhex/branches/dlvhex-refactoring/examples/benchmark.sh 2012-02-24 10:24:42 UTC (rev 3566)
+++ dlvhex/branches/dlvhex-refactoring/examples/benchmark.sh 2012-02-24 12:49:47 UTC (rev 3567)
@@ -1,3 +1,5 @@
+alarm() { perl -e 'alarm shift; exec @ARGV' "$@"; }
+
if [ $# -le 3 ]; then
echo "Usage:"
echo " benchmark.sh [Program] [Min Domain Size] [Max Domain Size] [Timeout/s] [Configuration Strings (optional)]"
@@ -57,9 +59,12 @@
for c in "${confs[@]}"
do
if [ ${timeout[$i]} -eq 0 ]; then
- /usr/bin/time -o time.txt -f %e dlvhex $c $wd/prog.hex 2>/dev/null >/dev/null
+ alarm $1 /usr/bin/time -o time.txt -f %e dlvhex2 $c $wd/prog.hex 2>/dev/null >/dev/null
output=`cat time.txt`
timeout[$i]=`echo "$output > $4" | bc`
+ if [ "$output" = "" ]; then
+ output=$4
+ fi
if [ ${timeout[$i]} -eq 1 ]; then
output=$4
fi
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|