1
1

Mods to summed output after meeting.

Этот коммит содержится в:
Monte Goode 2016-04-18 12:22:59 -07:00
родитель 8d94dc289d
Коммит 897687ac0f

Просмотреть файл

@ -36,6 +36,8 @@ def generate_output(iperf, options):
def summed_output(iperf, options): def summed_output(iperf, options):
"""Format summed output.""" """Format summed output."""
for i in iperf.get('intervals'):
row_header = None row_header = None
byte = list() byte = list()
@ -43,13 +45,12 @@ def summed_output(iperf, options):
retransmits = list() retransmits = list()
snd_cwnd = list() snd_cwnd = list()
for i in iperf.get('intervals'):
for ii in i.get('streams'): for ii in i.get('streams'):
if options.verbose: if options.verbose:
pp.pprint(i) pp.pprint(i)
# grab the first start value # grab the first start value
if row_header is None: if row_header is None:
row_header = round(float(ii.get('start')), 4) row_header = round(float(ii.get('start')), 2)
# aggregate the rest of the values # aggregate the rest of the values
byte.append(ii.get('bytes')) byte.append(ii.get('bytes'))
bits_per_second.append(float(ii.get('bits_per_second')) / (1000*1000*1000)) bits_per_second.append(float(ii.get('bits_per_second')) / (1000*1000*1000))
@ -64,7 +65,7 @@ def summed_output(iperf, options):
s=round(sum(snd_cwnd) / len(snd_cwnd), 2) s=round(sum(snd_cwnd) / len(snd_cwnd), 2)
) )
return row yield row
def main(): def main():