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
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
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