Skip to content
This repository has been archived by the owner on Jun 27, 2018. It is now read-only.

Commit

Permalink
changes to make iperf work better
Browse files Browse the repository at this point in the history
  • Loading branch information
ngsrinivas committed Feb 13, 2016
1 parent 4dbfce7 commit 8f334b1
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 6 deletions.
15 changes: 11 additions & 4 deletions pyretic/evaluations/Tests/e2e_stanford/policy.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,14 +76,21 @@ def workload_setup(bw_budget, net, **kwargs):
params = dict(kwargs)
viol_frac = params.get('viol_frac', 0.3)
acc_pairs, other_pairs = get_acc_other_pairs()
per_acc_bw = viol_frac * bw_budget / len(acc_pairs)
per_other_bw = (1-viol_frac) * bw_budget / len(other_pairs)

from random import shuffle
shuffle(acc_pairs)
shuffle(other_pairs)
acc_count = 3
other_count = 4
per_acc_bw = viol_frac * bw_budget / acc_count
per_other_bw = (1-viol_frac) * bw_budget / other_count
srcs, dsts, bws = [], [], []
for (src, dst) in acc_pairs:

for (src, dst) in acc_pairs[:acc_count]:
srcs.append(net.hosts[src-NUM_SWITCHES-1])
dsts.append(net.hosts[dst-NUM_SWITCHES-1])
bws.append(per_acc_bw)
for (src, dst) in other_pairs:
for (src, dst) in other_pairs[:other_count]:
srcs.append(net.hosts[src-NUM_SWITCHES-1])
dsts.append(net.hosts[dst-NUM_SWITCHES-1])
bws.append(per_other_bw)
Expand Down
4 changes: 2 additions & 2 deletions pyretic/evaluations/mininet_e2e.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
PYRETIC_STDERR="pyretic-stderr.txt"
OVHEAD_TRAFFIC="overhead-traffic.txt"
OPTIMAL_TRAFFIC="optimal-traffic.txt"
TOTAL_BW_BIT_PS=18000000
TOTAL_BW_BIT_PS=1800000
IPERF_SERVER_PREFIX="server-udp"
IPERF_CLIENT_PREFIX="client-udp"
IPERF_MIN=1.63 * 1000 * 8
Expand Down Expand Up @@ -197,7 +197,7 @@ def query_test():
optps, optfs = [], []
time.sleep(TSHARK_SLACK_SEC)
run_iperf_test(test_module, polopts, rfolder, net)
time.sleep(TEST_DURATION_SEC)
time.sleep(TEST_DURATION_SEC + 2*TSHARK_SLACK_SEC)
kill_processes([ctlr, ovhp] + optps)
close_fds([c_out, c_err, ovhf] + optfs)

Expand Down

0 comments on commit 8f334b1

Please sign in to comment.