TestSpecs/gen: rgen tracker-rgen tracker-tgen updated
[p2p-testing-infrastructure.git] / TestSpecs / gen / tracker-rgen
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