Ejemplo n.º 1
0
delay 0 /vagrant/code/tc_helper.sh set_delay {delay}
delay {cleantime} /vagrant/code/tc_helper.sh destroy

bandwidth 0 /vagrant/code/tc_helper.sh {set_bw_command}
bandwidth {cleantime} /vagrant/code/tc_helper.sh destroy

server 1 /vagrant/code/tcpprobe_helper.sh 5001 &>$LOGDIR/cwnd.log & echo $! > /tmp/pid_tcpprobe
server 2 sudo tcpdump -i eth1 port 5001 -s0 -w $LOGDIR/sender.pcap 2>&1 & echo $! > /tmp/pid_tcpdump
server {killtime} sudo kill -SIGTERM $(cat /tmp/pid_tcpprobe) & sudo kill -SIGTERM $(cat /tmp/pid_tcpdump)

bandwidth 0 sudo tcpdump -tt -v -ieth1 -s96 -w $LOGDIR/dump_bandwidth_eth1.pcap 2>&1 & echo $! >/tmp/pid_tcpdump_eth1
bandwidth {killtime} sudo kill -SIGTERM $(cat /tmp/pid_tcpdump_eth1)
bandwidth 0 sudo tcpdump -tt -v -ieth2 -s96 -w $LOGDIR/dump_bandwidth_eth2.pcap 2>&1 & echo $! >/tmp/pid_tcpdump_eth2
bandwidth {killtime} sudo kill -SIGTERM $(cat /tmp/pid_tcpdump_eth2)

delay 2 /vagrant/code/tc_helper.sh watch_buffer_size &>$LOGDIR/delay_buffer.log & echo $! > /tmp/pid_buffersize
delay {killtime} sudo kill -SIGTERM $(cat /tmp/pid_buffersize)

bandwidth 2 /vagrant/code/tc_helper.sh watch_buffer_size &>$LOGDIR/bandwidth_buffer.log & echo $! > /tmp/pid_buffersize
bandwidth {killtime} sudo kill -SIGTERM $(cat /tmp/pid_buffersize)

server 5 iperf -c client0 -t {interval} &>$LOGDIR/iperf_c.log

'''.format(session_infos=json.dumps(session_infos), set_bw_command=set_bw_command, interval=test['time'], killtime=test['time']+5, cleantime=test['time']+10, **session_infos)
			testname='iperf_{}_{}'.format(delay, aqm_algorithm)
			group_dir=os.path.join('tests', testname)
			save_dir = os.path.join(group_dir, "{0:02d}_{1}_{2}_{3}".format(i+1, test['bw'], delay, buffersize))
			mkdir_p(save_dir)
			with open(os.path.join(save_dir, 'jobs.sched'), 'w') as f:
				f.write(scheduler_commands)
Ejemplo n.º 2
0
     mean_confidence,
     mean_confidence,
     mean_confidence,
     mean_confidence,
     mean_confidence,
     summ,
     summ,
     summ,
     mean_confidence,
     mean_confidence,
     mean_confidence,
     summ,
 )
 columns = dict([(h, []) for h in headers])
 if os.path.dirname(outfile) is not "":
     mkdir_p(os.path.dirname(outfile))
 with open(outfile, "w") as f:
     f.write("label,{}\n".format(",,".join(headers)))
     for filename, runs in sessions_summary.iteritems():
         for run_zerobased, summaries in enumerate(runs):
             for summary in summaries:
                 values = [summary.__dict__[index] if index in summary.__dict__ else "" for index in headers]
                 f.write("{}/{},{}\n".format(filename, run_zerobased + 1, ",,".join(map(str, values))))
                 for h in headers:
                     try:
                         columns[h].append(summary.__dict__[h])
                     except KeyError:
                         continue
     result = []
     for i, h in enumerate(headers):
         if len(columns[h]):
Ejemplo n.º 3
0
			except:
				pass
			summary.VLClogs = []
			for VLClog in session.VLClogs:
				VLCsummary = EmptyObject()
				VLCsummary.instability = VLClog.get_instability()
				summary.VLClogs.append(VLCsummary)

			sessions_summary.sessions.append(summary)

	if len(sessions_summary.sessions):
		if not export:
			print "Plotting..."
			plotScatters(sessions_summary, thickness_factor=2, tag_points=True)
		else:
			mkdir_p('tests/scatterplots')
			export_bw = os.path.join('tests/scatterplots', export)
			mkdir_p(os.path.join('tests/scatterplots', 'tag'))
			export_tag = os.path.join('tests/scatterplots', 'tag', export.replace('.png', '_tag.png'))
			export_big = os.path.join('tests/scatterplots', 'tag', export.replace('.png', '_big.png'))
			mkdir_p(os.path.join('tests/scatterplots', 'color'))
			export_color = os.path.join('tests/scatterplots', 'color', export.replace('.png', '_color.png'))

			print "Plotting {0} with tags...".format(export)
			plotScatters(sessions_summary, export=export_tag, export_big=export_big, thickness_factor=2, tag_points=True)
			print "Plotting {0} without tags...".format(export)
			plotScatters(sessions_summary, export=export_color, thickness_factor=2, tag_points=False)
			print "Plotting {0} without colors...".format(export)
			plotScatters(sessions_summary, export=export_bw, thickness_factor=2, tag_points=False, colorize=False)