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
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
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))
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,-)"
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"