Log In
New Account
  
 
Home My Page Project Tree Code Snippets Project Openings NUTSS
 
 
Summary Tracker Lists CVS Files
 

CVS | Administration


File:  [GForge:cvsroot/nutss] / libnutss / examples / swp_vl_test
Revision 1.6: download - view: text, annotated - select for diffs
Tue Jul 3 16:45:11 2007 UTC (10 years, 2 months ago) by ths
Branches: MAIN
CVS tags: HEAD
more tweaks to test harness

#!/bin/bash

trap "killall lt-nutssd lt-slinksvariableload" SIGINT SIGTERM

if [ "$#" == "0" ]; then
    echo -e "Usage:\n  swp_vl_test number_of_nodes number_of_peers time_limit max_flow_duration max_flow_weight max_load"
    exit 0
fi

if [ ! -x "./slinksvariableload" -o ! -x "./nutssd" ]; then
    echo "Cannot file slinkapp and nutssd."
    echo "The test must be run from the libnutss/examples directory"
    exit 0
fi

mkdir -p output
rm output/*

echo nodes: $1 > output/param0.txt
echo peers: $2 > output/param1.txt
echo time limit: $3 > output/param2.txt
echo max flow duration: $4 > output/param3.txt
echo max flow weight: $5 > output/param4.txt
echo max load: $6 > output/param5.txt

cat output/param* > output/args.txt
rm output/param*

killall lt-nutssd
./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt &

for i in $(seq $1); do
	./slinksvariableload $i $2 $3 `expr $RANDOM % \( $4 / 4 \) + $4 - \( $4 / 8 \)` `expr $RANDOM % \( $5 / 4 \) + $5 - \( $5 / 8 \)` `expr $RANDOM % \( $6 / 4 \) + $6 - \( $6 / 8 \)` &
done

#export K = `expr $1 + 1`

#while true; do
#	sleep 20
#	./slinksvariableload $K $2 $3 `expr $RANDOM % $4 + 1` `expr $RANDOM % $5 + 1` `expr $RANDOM % $6 + 1` &	
#	export K = `expr $K + 1`
#done

FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>
 

GForge.cis.cornell.edu is brought to you by

Cornell Computing and Information Science


Powered By GForge Collaborative Development Environment