Skip to content

Commit

Permalink
refs #3: Allow single-node execution when using run_thruput.py
Browse files Browse the repository at this point in the history
  • Loading branch information
achimnol committed Jul 17, 2015
1 parent fe3e3f5 commit fd8075c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions scripts/run_throughput.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,8 +144,12 @@
thruput_records = thruput_reader.get_records()
avg_thruput_mpps, avg_thruput_gbps = 0.0, 0.0
for node_id in range(num_nodes):
avg_thruput_mpps += mean(t.mpps for t in thruput_records if t.node_id == node_id)
avg_thruput_gbps += mean(t.gbps for t in thruput_records if t.node_id == node_id)
mpps = [t.mpps for t in thruput_records if t.node_id == node_id]
gbps = [t.gbps for t in thruput_records if t.node_id == node_id]
if len(mpps) > 0:
avg_thruput_mpps += mean(mpps)
if len(gbps) > 0:
avg_thruput_gbps += mean(gbps)
print('{0:6.2f}'.format(avg_thruput_mpps), end=' ')
print('{0:6.2f}'.format(avg_thruput_gbps), end=' ')
all_thruput_records.extend(thruput_records)
Expand Down

0 comments on commit fd8075c

Please sign in to comment.