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

CVS | Administration

Diff for /libnutss/examples/swp_vl_test between versions 1.11 and 1.12

version 1.11, 2007/07/28 00:41:57 version 1.12, 2007/08/23 22:13:44
Line 3 Line 3
 trap "killall lt-nutssd lt-slinksvariableload" SIGINT SIGTERM  trap "killall lt-nutssd lt-slinksvariableload" SIGINT SIGTERM
   
 if [ "$#" == "0" ]; then  if [ "$#" == "0" ]; then
   echo -e "Usage:\n  swp_vl_test num_nodes num_peers num_msgs percent_load max_flow_duration max_flow_weightexperiment_duration"    echo -e "Usage:\n  swp_vl_test num_nodes num_msgs percent_load max_flow_duration max_flow_weightmax_capacity experiment_duration"
     exit 0      exit 0
 fi  fi
   
Line 17  mkdir -p output Line 17  mkdir -p output
 rm output/*  rm output/*
   
 echo nodes: $1 > output/param1.txt  echo nodes: $1 > output/param1.txt
echopeers: $2 > output/param2.txtechorequests per node: $2 > output/param2.txt
echorequests pernode: $3 > output/param3.txtechomax percent load: $3 > output/param3.txt
echo maxpercent load: $4 > output/param4.txtecho maxflow duration: $4 > output/param4.txt
echo max flowduration: $5 > output/param5.txtecho max flowweight: $5 > output/param5.txt
echo maxflow weight: $6 > output/param6.txtecho maxcapacity: $6 > output/param6.txt
 echo experiment duration: $7 > output/param7.txt  echo experiment duration: $7 > output/param7.txt
   
 cat output/param* > output/args.txt  cat output/param* > output/args.txt
Line 32  killall lt-nutssd Line 32  killall lt-nutssd
 ./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt &  ./nutssd -stwn -r sip.nutss.net:5060 -p ths1 ths1@nutss.net >output/debug_registrar.txt &
   
 for i in $(seq $1); do  for i in $(seq $1); do
       ./slinksvariableload $i`expr $RANDOM % $2 + 5` $3 $4 `expr $RANDOM % $5 + 60` `expr $RANDOM %\( $6 / 4 \) + $6- \( $6 / 8 \)` &        if [ $i -ne 99 ]; then
#        ./slinksvariableload $i`expr $RANDOM % $2 + 5` $3 $4 `expr $RANDOM % $5 +120` $6&       # with some small probability, generate a super node with capacity many times greater than normal
        if [ `expr $RANDOM % $6` -gt `expr $6 - $6 / 25` ]; then
       ./slinksvariableload $i$2 $3 `expr $RANDOM % $4 + 60` `expr $RANDOM %$5 + 200` `expr $RANDOM % $6+ 100000` &
       echo node $i is a super node
        else
       ./slinksvariableload $i$2 $3 `expr $RANDOM % $4 + 60` `expr $RANDOM % $5 +200` `expr $RANDOM % $6+ 1200` &
         fi
         fi
 done  done
   
./slinksvariableload 99 $1$2 $7 &./slinksvariableload 99 $1`expr $1 / 6` $7 &
 
 #for i in $(seq $1 `expr $1 \* 3`); do
        sleep 10
        if [ `expr $RANDOM % 100` -lt 50 ] && [ $i -ne 99 ]; then
       if [ `expr $RANDOM % $6` -gt `expr $6 - $6 / 8` ]; then
      ./slinksvariableload $i $2 $3 `expr $RANDOM % $4 + 60` `expr $RANDOM % $5 + 200` `expr $RANDOM % $6 + 20000` &
       else
      ./slinksvariableload $i $2 $3 `expr $RANDOM % $4 + 60` `expr $RANDOM % $5 + 200` `expr $RANDOM % $6 + 1200` &
        fi
        fi
 #done

Removed from v.1.11  
changed lines
  Added in v.1.12


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