Sha256: 9825d62aa7f076ab9e312408a23e1556dc769e6ca19c2f72c5d78ad34df19798

Contents?: true

Size: 1.27 KB

Versions: 12

Compression:

Stored size: 1.27 KB

Contents

#!/bin/sh

N=100
LOCATION=example/HelloWorld/
CLEAR=1
LIMIT=10

usage() {
    echo "Usage: run.sh [-n NUMBER] [-l LOCATION] [-z] [--limit SEC]"
    echo "         -n NUMBER     do the test NUMBER times"
    echo "         -l LOCATION   location of process document"
    echo "         -z            don't clear output location"
    echo "         --limit SEC   timeout after SEC seconds"
    exit 1
}

OPT=`getopt -o n:l:z -l limit: -- "$@"`; [ $? -ne 0 ] && usage
eval set -- "$OPT"

while true
do
    case $1 in
	-n)
	    N=$2; shift 2
	    ;;
	-l)
	    LOCATION="$2"; shift 2
	    ;;
	-z)
	    CLEAR=0; shift
	    ;;
	--limit)
	    LIMIT=$2; shift 2
	    ;;
	--)
	    shift; break
	    ;;
	*)
	    usage
	    ;;
    esac
done

echo "endurance-test($N times)"
echo "  location: $LOCATION"
echo "  limit: $LIMIT"
echo "  clear output: $CLEAR (1: true, 0: faluse)"
RESULT=endurance-test-result.txt
TIME=endurance-test-time.txt

echo "number, result" > ${RESULT}
echo "number, real, user, sys" > ${TIME}

for i in `seq 1 $N`
do
    echo "--- ${i} ---"
    if [ $CLEAR -eq 1 ]
    then
	rm -rf output
    fi
    timeout -s 9 $LIMIT time --quiet --append -o ${TIME} -f "${i}, %e, %U, %S"  pione-client ${LOCATION} --rehearse
    echo "${i}, $?" >> ${RESULT}
    sleep 1
    pkill -KILL -fe pione-
done

Version data entries

12 entries across 12 versions & 1 rubygems

Version Path
pione-0.5.0 misc/endurance-test/run.sh
pione-0.5.0.alpha.2 misc/endurance-test/run.sh
pione-0.5.0.alpha.1 misc/endurance-test/run.sh
pione-0.4.2 misc/endurance-test/run.sh
pione-0.4.1 misc/endurance-test/run.sh
pione-0.4.0 misc/endurance-test/run.sh
pione-0.3.2 misc/endurance-test/run.sh
pione-0.3.1 misc/endurance-test/run.sh
pione-0.3.0 misc/endurance-test/run.sh
pione-0.2.2 test/endurance-test/run.sh
pione-0.2.1 test/endurance-test/run.sh
pione-0.2.0 test/endurance-test/run.sh