TestSpecs/gen: rgen tracker-rgen tracker-tgen updated
authorP2P-Next User <p2p@p2p-next-04-201.grid.pub.ro>
Wed, 10 Nov 2010 10:26:22 +0000 (12:26 +0200)
committerP2P-Next User <p2p@p2p-next-04-201.grid.pub.ro>
Wed, 10 Nov 2010 10:26:31 +0000 (12:26 +0200)
TestSpecs/gen/rgen
TestSpecs/gen/tracker-rgen
TestSpecs/gen/tracker-tgen

index 7537633..2c8af8c 100755 (executable)
@@ -96,14 +96,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+leecher${index}\$dlspeed <- leecher${index}\$dlspeed*8/1000
+END
                ((index++))
+       elif test_is_seeder ${client_type}; then
+               ((index++))
+               continue
+       else
                continue
        fi
-       cat <<END
-leecher${index}\$dlspeed <- leecher${index}\$dlspeed*8/1000
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
@@ -114,14 +117,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+geom_point(aes(x=leecher${index}\$percent, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
+END
+               ((index++))
+       elif test_is_seeder ${client_type}; then
                ((index++))
                continue
+       else
+               continue
        fi
-       cat <<END
-geom_point(aes(x=leecher${index}\$percent, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
@@ -149,14 +155,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+geom_point(aes(x=leecher${index}\$time, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
+END
+               ((index++))
+       elif test_is_seeder ${client_type}; then
                ((index++))
                continue
+       else
+               continue
        fi
-       cat <<END
-geom_point(aes(x=leecher${index}\$time, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
index efb885c..8c2605d 100755 (executable)
@@ -98,14 +98,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+leecher${index}\$dlspeed <- leecher${index}\$dlspeed*8/1000
+END
                ((index++))
+       elif test_is_seeder ${client_type}; then
+               ((index++))
+               continue
+       else
                continue
        fi
-       cat <<END
-leecher${index}\$dlspeed <- leecher${index}\$dlspeed*8/1000
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
@@ -116,14 +119,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+geom_point(aes(x=leecher${index}\$percent, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
+END
+               ((index++))
+       elif test_is_seeder ${client_type}; then
                ((index++))
                continue
+       else
+               continue
        fi
-       cat <<END
-geom_point(aes(x=leecher${index}\$percent, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
@@ -151,14 +157,17 @@ END
 
 index=1
 while read server port user remote_path remote_if dl_bw dl_burst ul_bw ul_burst num_conn pre_run_script post_run_script client_type torrent_file periods; do
-       if ! test_is_leecher ${client_type}; then
+       if test_is_leecher ${client_type}; then
+               cat <<END
+geom_point(aes(x=leecher${index}\$time, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
+END
+               ((index++))
+       elif test_is_seeder ${client_type}; then
                ((index++))
                continue
+       else
+               continue
        fi
-       cat <<END
-geom_point(aes(x=leecher${index}\$time, y=leecher${index}\$dlspeed, label="Leecher ${index}"), size=1) +
-END
-       ((index++))
 done < <(grep -v '^#\|^[ \t]*$' ${scenario_file})
 
 cat <<END
index 13a4134..471e6c9 100755 (executable)
@@ -43,7 +43,7 @@ generate_scenario()
        data_size=$5
        description=$6
 
-       num_seeders=1
+       num_seeders=$num_trackers
        num_clients_per_tracker=4
        num_leechers=$(($num_trackers * $num_clients_per_tracker - $num_seeders))
 
@@ -77,7 +77,7 @@ generate_scenario()
                echo -en "0\t\t\t"
                echo -en "pre-run_nop.sh\t\t"
                echo -en "post-run_nop.sh\t\t"
-               echo -en "xbtut_tracker\t\t"
+               echo -en "xbtut\t\t"
                echo -en "N/A\t"
                echo "(0,-)"
 
@@ -104,7 +104,7 @@ generate_scenario()
                        echo -en "pre-run_nop.sh\t\t"
                        echo -en "post-run_nop.sh\t\t"
 
-                       if test $index -lt $num_seeders; then
+                       if test $(($index % $num_clients_per_tracker)) -eq 0; then
                                echo -en "hrktorrent_seeder_limit\t\t"
                        elif test $index -lt $(($num_seeders+$num_leechers)); then
                                echo -en "hrktorrent_leecher_limit\t"