From: Razvan Deaconescu Date: Tue, 17 Aug 2010 13:18:18 +0000 (+0300) Subject: TestSpecs: add script and input file for generating scenario configuration files X-Git-Url: http://p2p-next.cs.pub.ro/gitweb/?a=commitdiff_plain;h=3f5a0d918a30f90b7fd8bcdce80a1570f7a48d8a;p=p2p-testing-infrastructure.git TestSpecs: add script and input file for generating scenario configuration files --- diff --git a/TestSpecs/gen/P2P_Experimente_Swarm-metrics.csv b/TestSpecs/gen/P2P_Experimente_Swarm-metrics.csv new file mode 100644 index 0000000..30070d5 --- /dev/null +++ b/TestSpecs/gen/P2P_Experimente_Swarm-metrics.csv @@ -0,0 +1,114 @@ +1.01,1,89,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.02,10,80,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.03,20,70,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.04,30,60,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.05,40,50,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.06,45,45,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.07,50,40,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.08,60,30,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.09,70,20,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.10,80,10,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +1.11,89,1,90,Nelimitat,1 Mbit/s,1 Mbit/s,700M +2.01,1,89,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.02,10,80,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.03,20,70,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.04,30,60,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.05,40,50,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.06,45,45,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.07,50,40,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.08,60,30,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.09,70,20,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.10,80,10,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +2.11,89,1,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +3.01,1,89,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.02,10,80,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.03,20,70,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.04,30,60,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.05,40,50,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.06,45,45,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.07,50,40,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.08,60,30,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.09,70,20,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.10,80,10,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +3.11,89,1,90,Nelimitat,16 Mbit/s,16 Mbit/s,700M +4.01,1,69,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.02,10,60,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.03,20,50,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.04,30,40,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.05,35,35,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.06,40,30,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.07,50,20,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.08,60,10,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +4.09,69,1,70,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.01,1,49,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.02,10,40,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.03,20,30,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.04,25,25,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.05,30,20,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.06,40,10,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.07,49,1,50,Nelimitat,8 Mbit/s,8 Mbit/s,700M +6.01,1,29,30,Nelimitat,8 Mbit/s,8 Mbit/s,700M +6.02,10,20,30,Nelimitat,8 Mbit/s,8 Mbit/s,700M +6.03,15,15,30,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.04,20,10,30,Nelimitat,8 Mbit/s,8 Mbit/s,700M +5.05,29,1,30,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.01,1,9,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.02,2,8,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.03,3,7,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.04,4,6,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.05,5,5,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.06,6,4,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.07,7,3,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.08,8,2,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +7.09,9,1,10,Nelimitat,8 Mbit/s,8 Mbit/s,700M +8.01,10,80,90,10,8 Mbit/s,8 Mbit/s,700M +8.02,10,80,90,20,8 Mbit/s,8 Mbit/s,700M +8.03,10,80,90,30,8 Mbit/s,8 Mbit/s,700M +8.04,10,80,90,40,8 Mbit/s,8 Mbit/s,700M +8.05,10,80,90,50,8 Mbit/s,8 Mbit/s,700M +8.06,10,80,90,60,8 Mbit/s,8 Mbit/s,700M +8.07,10,80,90,70,8 Mbit/s,8 Mbit/s,700M +8.08,10,80,90,80,8 Mbit/s,8 Mbit/s,700M +8.09,10,80,90,90,8 Mbit/s,8 Mbit/s,700M +8.10,10,80,90,100,8 Mbit/s,8 Mbit/s,700M +9.01,30,60,90,10,8 Mbit/s,8 Mbit/s,700M +9.02,30,60,90,20,8 Mbit/s,8 Mbit/s,700M +9.03,30,60,90,30,8 Mbit/s,8 Mbit/s,700M +9.04,30,60,90,40,8 Mbit/s,8 Mbit/s,700M +9.05,30,60,90,50,8 Mbit/s,8 Mbit/s,700M +9.06,30,60,90,60,8 Mbit/s,8 Mbit/s,700M +9.07,30,60,90,70,8 Mbit/s,8 Mbit/s,700M +9.08,30,60,90,80,8 Mbit/s,8 Mbit/s,700M +9.09,30,60,90,90,8 Mbit/s,8 Mbit/s,700M +9.10,30,60,90,100,8 Mbit/s,8 Mbit/s,700M +10.01,60,30,90,10,8 Mbit/s,8 Mbit/s,700M +10.02,60,30,90,20,8 Mbit/s,8 Mbit/s,700M +10.03,60,30,90,30,8 Mbit/s,8 Mbit/s,700M +10.04,60,30,90,40,8 Mbit/s,8 Mbit/s,700M +10.05,60,30,90,50,8 Mbit/s,8 Mbit/s,700M +10.06,60,30,90,60,8 Mbit/s,8 Mbit/s,700M +10.07,60,30,90,70,8 Mbit/s,8 Mbit/s,700M +10.08,60,30,90,80,8 Mbit/s,8 Mbit/s,700M +10.09,60,30,90,90,8 Mbit/s,8 Mbit/s,700M +10.10,60,30,90,100,8 Mbit/s,8 Mbit/s,700M +11.01,80,10,90,10,8 Mbit/s,8 Mbit/s,700M +11.02,80,10,90,20,8 Mbit/s,8 Mbit/s,700M +11.03,80,10,90,30,8 Mbit/s,8 Mbit/s,700M +11.04,80,10,90,40,8 Mbit/s,8 Mbit/s,700M +11.05,80,10,90,50,8 Mbit/s,8 Mbit/s,700M +11.06,80,10,90,60,8 Mbit/s,8 Mbit/s,700M +11.07,80,10,90,70,8 Mbit/s,8 Mbit/s,700M +11.08,80,10,90,80,8 Mbit/s,8 Mbit/s,700M +11.09,80,10,90,90,8 Mbit/s,8 Mbit/s,700M +11.10,80,10,90,100,8 Mbit/s,8 Mbit/s,700M +12.01,30,60,90,Nelimitat,8 Mbit/s,8 Mbit/s,700M +12.02,30,60,90,Nelimitat,8 Mbit/s,4 Mbit/s,700M +12.03,30,60,90,Nelimitat,8 Mbit/s,1 Mbit/s,700M +12.04,30,60,90,Nelimitat,1 Mbit/s,8 Mbit/s,700M +12.05,30,60,90,Nelimitat,4 Mbit/s,8 Mbit/s,700M +12.06,30,60,90,Nelimitat,16 Mbit/s,8 Mbit/s,700M +12.07,30,60,90,Nelimitat,16 Mbit/s,4 Mbit/s,700M +12.08,30,60,90,Nelimitat,16 Mbit/s,1 Mbit/s,700M +12.09,30,60,90,Nelimitat,32 Mbit/s,8 Mbit/s,700M +12.10,30,60,90,Nelimitat,32 Mbit/s,4 Mbit/s,700M +12.11,30,60,90,Nelimitat,32 Mbit/s,1 Mbit/s,700M diff --git a/TestSpecs/gen/tgen b/TestSpecs/gen/tgen new file mode 100644 index 0000000..bb15a69 --- /dev/null +++ b/TestSpecs/gen/tgen @@ -0,0 +1,88 @@ +#!/bin/bash + +if test $# -ne 2; then + echo "Usage: $0 campaign-name test-description-file" 1>&2 + exit 1 +fi + +campaign_name=$1 +input=$2 + +parse_conn() +{ + echo "" | awk -v var="$1" '{print var + 0;}' +} + +parse_bw() +{ + echo "" | awk -v var="$1" '{print var + 0;}' +} + +parse_file() +{ + size=$(echo "" | awk -v var="$1" '{print var + 0;}') + echo "Data.$size.ct.torrent" +} + +generate_scenario() +{ + exp_no=$1 + num_seeders=$2 + num_leechers=$3 + num_conn=$4 + down_bw=$5 + up_bw=$6 + seed_torrent=$7 + + echo -e "#\n# Campaign $campaign_name; scenario $exp_no\n#" + echo "### BEGIN SCENARIO INFO" + echo "# Id: $exp_no" + echo "# Description: TODO" + echo "# Number of seeders: $num_seeders" + echo "# Number of leechers: $num_leechers" + echo "# Client type: TODO" + echo "### END SCENARIO INFO" + echo "" + + echo -e "# Hostname\t\t\tSSHport\t\tUser\t\tRemoteFolder\t\tNetInterface\t\tDownload(Mbps)\tDownloadBurst(K)\tUpload(Mbps)\tUploadBurst(K)\t\tPreRunScript\t\tPostRunScript\t\tClientType\t\tTorrentFile\t\tPeriods" + index=0 + for sys_index in 01 03 04 05 06 07 08 09 10; do + for ce_index in 1 2 3 4 5 6 7 8 9 10; do + echo -en "p2p-next-$sys_index.ncit.pub.ro\t\t" + echo -en "1$(printf %02g $ce_index)22\t\t" + echo -en "p2p\t\t" + echo -en "/home/p2p/george\t" + echo -en "eth0\t\t" + echo -en "$down_bw\t\t" + echo -en "100\t\t\t" + echo -en "$up_bw\t\t" + echo -en "100\t\t\t" + echo -en "pre-run_nop.sh\t\t" + echo -en "post-run_nop.sh\t\t" + + if test $index -lt $num_seeders; then + echo -en "hrktorrent_seeder_limit\t\t" + elif test $index -lt $(($num_seeders+$num_leechers)); then + echo -en "hrktorrent_leecher_limit\t\t" + fi + + echo -en "$seed_torrent\t" + echo "(0,-)" + + index=$((index+1)) + + if test $index -ge $(($num_seeders+$num_leechers)); then + return + fi + done + done +} + +while IFS="," read exp_no num_seeders num_leechers num_peers num_conn down_bw up_bw data_size; do + this_conn=$(parse_conn $num_conn) + this_down_bw=$(parse_bw $down_bw) + this_up_bw=$(parse_bw $up_bw) + this_seed_torrent=$(parse_file $data_size) + + generate_scenario "$exp_no" "$num_seeders" "$num_leechers" "$this_conn" "$this_down_bw" "$this_up_bw" "$this_seed_torrent" > "${campaign_name}-${exp_no}".cfg +done < $input