Commit 05fe9ca5 authored by Jonas Kaufmann's avatar Jonas Kaufmann Committed by Antoine Kaufmann
Browse files

fix pylint issues in results/

parent fc3f0602
...@@ -43,7 +43,7 @@ print('\t'.join(['threshold'] + confignames)) ...@@ -43,7 +43,7 @@ print('\t'.join(['threshold'] + confignames))
for k_val in range(0, max_k + 1, k_step): for k_val in range(0, max_k + 1, k_step):
line = [str(k_val)] line = [str(k_val)]
for h, mtu in configs: for h, mtu in configs:
path_pat = '%s%s-ib-dumbbell-DCTCPm%d-%d' % (basedir, h, k_val, mtu) path_pat = f'{basedir}{h}-ib-dumbbell-DCTCPm{k_val}-{mtu}'
res = utils.iperf.parse_iperf(path_pat) res = utils.iperf.parse_iperf(path_pat)
if res['avg'] is None: if res['avg'] is None:
...@@ -52,11 +52,12 @@ for k_val in range(0, max_k + 1, k_step): ...@@ -52,11 +52,12 @@ for k_val in range(0, max_k + 1, k_step):
tp = res['avg'] tp = res['avg']
# TP * (MTU ) / (MTU - IP (20) - TCP w/option (24)) # TP * (MTU ) / (MTU - IP (20) - TCP w/option (24))
if (h == 'gt' or h == 'qt'): if h in ('gt', 'qt'):
tp_calib = tp * (mtu) / (mtu - 20 - 24) tp_calib = tp * (mtu) / (mtu - 20 - 24)
else: else:
# TP * (MTU + ETH(14) + PHY(24)) / (MTU - IP (20) - TCP w/option (24)) # TP * (MTU + ETH(14) + PHY(24)) / (MTU - IP (20)
# - TCP w/option (24))
tp_calib = tp * (mtu + 14 + 24) / (mtu - 20 - 24) tp_calib = tp * (mtu + 14 + 24) / (mtu - 20 - 24)
line.append('%.2f' % (tp_calib)) line.append(f'{tp_calib:.2f}')
print('\t'.join(line)) print('\t'.join(line))
...@@ -28,6 +28,7 @@ time in hours, and the third column is the gem5 simulation time. ...@@ -28,6 +28,7 @@ time in hours, and the third column is the gem5 simulation time.
import json import json
import sys import sys
from os.path import exists
if len(sys.argv) != 2: if len(sys.argv) != 2:
print('Usage: dist_memcache.py OUTDIR') print('Usage: dist_memcache.py OUTDIR')
...@@ -41,18 +42,18 @@ host_types = ['qt', 'gem5'] ...@@ -41,18 +42,18 @@ host_types = ['qt', 'gem5']
for n_racks in racks: for n_racks in racks:
l = str(n_racks * n_hosts_per_rack) l = str(n_racks * n_hosts_per_rack)
for host_type in host_types: for host_type in host_types:
log_path = '%sdist_memcache-%s-%d-%d-1.json' % ( log_path = (
basedir, host_type, n_racks, n_hosts_per_rack f'{basedir}dist_memcache-{host_type}-{n_racks}-{n_hosts_per_rack}'
'-1.json'
) )
try: if exists(log):
log = open(log_path, 'r') with open(log_path, 'r', encoding='utf-8') as log:
except: exp_log = json.load(log)
diff_time = '' start_time = exp_log['start_time']
end_time = exp_log['end_time']
diff_time = float(end_time - start_time) / 60 / 60
else: else:
exp_log = json.load(log) diff_time = ''
start_time = exp_log['start_time']
end_time = exp_log['end_time']
diff_time = float(end_time - start_time) / 60 / 60
l += '\t' + str(diff_time) l += '\t' + str(diff_time)
......
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
import json import json
import os import os
import pathlib
import shutil
import sys import sys
# How to use # How to use
...@@ -37,11 +35,12 @@ num_client = ['1', '4'] ...@@ -37,11 +35,12 @@ num_client = ['1', '4']
outdir = sys.argv[1] outdir = sys.argv[1]
# pylint: disable=redefined-outer-name
def parse_sim_time(path): def parse_sim_time(path):
ret = {} ret = {}
if not os.path.exists(path): if not os.path.exists(path):
return ret return ret
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
ret['simtime'] = (data['end_time'] - data['start_time']) / 60 ret['simtime'] = (data['end_time'] - data['start_time']) / 60
...@@ -50,15 +49,12 @@ def parse_sim_time(path): ...@@ -50,15 +49,12 @@ def parse_sim_time(path):
for c in num_client: for c in num_client:
print('%s-client ModES Epoch' % (c)) print(f'{c}-client ModES Epoch')
for n in nics: for n in nics:
line = f'{n}' line = f'{n}'
for m in mode: for m in mode:
path = '%s/mode-%s-gt-%s-switch-%s-1.json' % (outdir, m, n, c) path = f'{outdir}/mode-{m}-gt-{n}-switch-{c}-1.json'
data = parse_sim_time(path) data = parse_sim_time(path)
if 'simtime' in data: t = data.get('simtime', '')
t = data['simtime'] line = f'{line} {t}'
else:
t = ''
line = line + ' ' + f'{t}'
print(line) print(line)
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
import json import json
import os import os
import pathlib
import shutil
import sys import sys
# How to use # How to use
...@@ -35,11 +33,12 @@ num_runs = 8 ...@@ -35,11 +33,12 @@ num_runs = 8
outdir = sys.argv[1] outdir = sys.argv[1]
# pylint: disable=redefined-outer-name
def parse_sim_time(path): def parse_sim_time(path):
ret = {} ret = {}
if not os.path.exists(path): if not os.path.exists(path):
return ret return ret
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
ret['simtime'] = (data['end_time'] - data['start_time']) / 60 ret['simtime'] = (data['end_time'] - data['start_time']) / 60
...@@ -51,7 +50,7 @@ total_time = 0 ...@@ -51,7 +50,7 @@ total_time = 0
for n in range(1, num_runs + 1): for n in range(1, num_runs + 1):
path = '%s/p8-gt-ib-sw-Host-1000m-1-%s.json' % (outdir, n) path = f'{outdir}/p8-gt-ib-sw-Host-1000m-1-{n}.json' % (outdir, n)
data = parse_sim_time(path) data = parse_sim_time(path)
if 'simtime' in data: if 'simtime' in data:
t = data['simtime'] t = data['simtime']
......
...@@ -23,7 +23,7 @@ ...@@ -23,7 +23,7 @@
import sys import sys
from time import gmtime, strftime from time import gmtime, strftime
from utils.netperf import * from utils.netperf import parse_netperf_run
def fmt_lat(lat): def fmt_lat(lat):
...@@ -32,20 +32,21 @@ def fmt_lat(lat): ...@@ -32,20 +32,21 @@ def fmt_lat(lat):
x = float(lat) x = float(lat)
if x >= 1000.: if x >= 1000.:
return '%.1f\\,ms' % (x / 1000) return f'{x / 1000:.1f}\\,ms'
else: else:
return '%d\\,$\\mu$s' % (int(x)) return f'{int(x)}\\,$\\mu$s'
# pylint: disable=redefined-outer-name
def fmt_tp(tp): def fmt_tp(tp):
if not tp: if not tp:
return '' return ''
x = float(tp) x = float(tp)
if x > 1000.: if x > 1000.:
return '%.2f\\,G' % (x / 1000) return f'{x / 1000:.2f}\\,G'
else: else:
return '%d\\,M' % (int(x)) return f'{int(x)}\\,M'
hosts = [('qemu', 'QK'), ('qt', 'QT'), ('gem5', 'G5')] hosts = [('qemu', 'QK'), ('qt', 'QT'), ('gem5', 'G5')]
...@@ -57,7 +58,7 @@ outdir = sys.argv[1] ...@@ -57,7 +58,7 @@ outdir = sys.argv[1]
for (h, h_l) in hosts: for (h, h_l) in hosts:
for (nic, nic_l) in nics: for (nic, nic_l) in nics:
for (net, net_l) in nets: for (net, net_l) in nets:
path = '%s/netperf-%s-%s-%s-1.json' % (outdir, h, net, nic) path = f'{outdir}/netperf-{h}-{net}-{nic}-1.json'
data = parse_netperf_run(path) data = parse_netperf_run(path)
if 'simtime' in data: if 'simtime' in data:
t = strftime('%H:%M:%S', gmtime(data['simtime'])) t = strftime('%H:%M:%S', gmtime(data['simtime']))
...@@ -67,7 +68,4 @@ for (h, h_l) in hosts: ...@@ -67,7 +68,4 @@ for (h, h_l) in hosts:
tp = fmt_tp(data.get('throughput', '')) tp = fmt_tp(data.get('throughput', ''))
latMean = fmt_lat(data.get('latenyMean', '')) latMean = fmt_lat(data.get('latenyMean', ''))
latTail = fmt_lat(data.get('latenyTail', '')) latTail = fmt_lat(data.get('latenyTail', ''))
print( print(f' {h_l} & {nic_l} & {net_l} & {tp} & {latMean} & t \\\\')
' %s & %s & %s & %s & %s & %s \\\\' %
(h_l, nic_l, net_l, tp, latMean, t)
)
...@@ -34,15 +34,16 @@ types_of_seq = ['ehseq', 'swseq'] ...@@ -34,15 +34,16 @@ types_of_seq = ['ehseq', 'swseq']
num_clients = [1, 2, 3, 4, 5, 6, 7, 8, 10, 12] num_clients = [1, 2, 3, 4, 5, 6, 7, 8, 10, 12]
print( print(
'num_client ehseq-tput(req/sec) ehseq-lat(us) swseq-tput(req/sec) swseq-lat(us)\n' 'num_client ehseq-tput(req/sec) ehseq-lat(us) swseq-tput(req/sec)'
' swseq-lat(us)\n'
) )
for num_c in num_clients: for num_c in num_clients:
line = [str(num_c)] line = [str(num_c)]
for seq in types_of_seq: for seq in types_of_seq:
path_pat = '%snopaxos-gt-ib-%s-%d-1.json' % (basedir, seq, num_c) path_pat = f'{basedir}nopaxos-gt-ib-{seq}-{num_c}-1.json'
res = utils.parse_nopaxos.parse_nopaxos_run(num_c, seq, path_pat) res = utils.parse_nopaxos.parse_nopaxos_run(num_c, path_pat)
#print(path_pat) #print(path_pat)
if ((res['throughput'] is None) or (res['latency'] is None)): if ((res['throughput'] is None) or (res['latency'] is None)):
...@@ -54,7 +55,7 @@ for num_c in num_clients: ...@@ -54,7 +55,7 @@ for num_c in num_clients:
tput = res['throughput'] tput = res['throughput']
lat = res['latency'] lat = res['latency']
line.append('%.2f' % (tput)) line.append(f'{tput:.2f}')
line.append(f'{lat}') line.append(f'{lat}')
print(' '.join(line)) print(' '.join(line))
...@@ -22,16 +22,14 @@ ...@@ -22,16 +22,14 @@
import fnmatch import fnmatch
import glob import glob
import itertools
import json import json
import os
import re import re
import sys
def parse_iperf_run(data, skip=1, use=8): def parse_iperf_run(data, skip=1, use=8):
tp_pat = re.compile( tp_pat = re.compile(
r'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*) ([GM])bits.*' r'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*)'
r' ([GM])bits.*'
) )
tps_time = {} tps_time = {}
for hn in fnmatch.filter(data['sims'].keys(), 'host.client.*'): for hn in fnmatch.filter(data['sims'].keys(), 'host.client.*'):
...@@ -47,7 +45,7 @@ def parse_iperf_run(data, skip=1, use=8): ...@@ -47,7 +45,7 @@ def parse_iperf_run(data, skip=1, use=8):
if time >= skip + use: if time >= skip + use:
continue continue
if not time in tps_time: if time not in tps_time:
tps_time[time] = [] tps_time[time] = []
if m.group(4) == 'G': if m.group(4) == 'G':
...@@ -73,7 +71,7 @@ def parse_iperf(basename, skip=1, use=8): ...@@ -73,7 +71,7 @@ def parse_iperf(basename, skip=1, use=8):
# skip checkpoints # skip checkpoints
continue continue
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
result = parse_iperf_run(data, skip, use) result = parse_iperf_run(data, skip, use)
if result is not None: if result is not None:
......
...@@ -32,17 +32,18 @@ def transform_internal(ts, component, msg): ...@@ -32,17 +32,18 @@ def transform_internal(ts, component, msg):
return None return None
elif msg.startswith('read device register ') and 'res=' in msg: elif msg.startswith('read device register ') and 'res=' in msg:
return None return None
elif msg.startswith('our dma') or \ elif (
msg.startswith('issuing dma') or \ msg.startswith('our dma') or msg.startswith('issuing dma') or
msg.startswith('processing ip packet') or \ msg.startswith('processing ip packet') or
msg.startswith('transmitting non-ip packet') or \ msg.startswith('transmitting non-ip packet') or
msg.startswith('transmitting ip packet'): msg.startswith('transmitting ip packet')
):
return None return None
return (ts + ' ' + msg) return f'{ts} {msg}'
def transform_external(ts, component, msg): def transform_external(ts, msg):
if msg.startswith('igbe: requesting restart clock:') or \ if msg.startswith('igbe: requesting restart clock:') or \
msg == 'igbe: scheduled' or \ msg == 'igbe: scheduled' or \
msg == 'igbe: rescheduling next cycle' or \ msg == 'igbe: rescheduling next cycle' or \
...@@ -51,7 +52,7 @@ def transform_external(ts, component, msg): ...@@ -51,7 +52,7 @@ def transform_external(ts, component, msg):
elif msg.startswith('[rxdesc]') or msg.startswith('[txdesc]'): elif msg.startswith('[rxdesc]') or msg.startswith('[txdesc]'):
msg = msg[9:] msg = msg[9:]
return (ts + ' ' + msg) return f'{ts} {msg}'
if len(sys.argv) != 3: if len(sys.argv) != 3:
...@@ -62,7 +63,9 @@ if len(sys.argv) != 3: ...@@ -62,7 +63,9 @@ if len(sys.argv) != 3:
outdir = sys.argv[1] outdir = sys.argv[1]
variant = sys.argv[2] variant = sys.argv[2]
with open(outdir + '/' + 'pci_validation-' + variant + '-1.json', 'r') as f: with open(
f'{outdir}/pci_validation-{variant}-1.json', 'r', encoding='utf-8'
) as f:
data = json.load(f) data = json.load(f)
if variant == 'internal': if variant == 'internal':
...@@ -80,6 +83,6 @@ for l in it: ...@@ -80,6 +83,6 @@ for l in it:
if not m: if not m:
continue continue
l = transform(m.group(1), m.group(2), m.group(3).lower()) l = transform(m.group(1), m.group(3).lower())
if l: if l:
print(l) print(l)
...@@ -20,7 +20,6 @@ ...@@ -20,7 +20,6 @@
# TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import itertools
import sys import sys
import utils.iperf import utils.iperf
...@@ -45,7 +44,7 @@ print('\t'.join(['config'] + list(map(str, lats)))) ...@@ -45,7 +44,7 @@ print('\t'.join(['config'] + list(map(str, lats))))
for (ht, nt, lab) in configs: for (ht, nt, lab) in configs:
cols = [str(lab)] cols = [str(lab)]
for lat in lats: for lat in lats:
path_pat = '%spcilat-%s-%s-switch-%d' % (basedir, ht, nt, lat) path_pat = f'{basedir}pcilat-{ht}-{nt}-switch-{lat}'
res = utils.iperf.parse_iperf(path_pat) res = utils.iperf.parse_iperf(path_pat)
if res['avg'] is None: if res['avg'] is None:
......
...@@ -21,10 +21,8 @@ ...@@ -21,10 +21,8 @@
# SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
import json import json
import os
import pathlib
import shutil
import sys import sys
from os.path import exists
if len(sys.argv) != 2: if len(sys.argv) != 2:
print('Usage: udp_scale.py OUTDIR') print('Usage: udp_scale.py OUTDIR')
...@@ -35,18 +33,15 @@ types_of_client = [1, 4, 9, 14, 20] ...@@ -35,18 +33,15 @@ types_of_client = [1, 4, 9, 14, 20]
bw = 1000 bw = 1000
for cl in types_of_client: for cl in types_of_client:
log_path = '%sgt-ib-sw-Host-%dm-%d-1.json' % (basedir, bw, cl) log_path = f'{basedir}gt-ib-sw-Host-{bw}m-{cl}-1.json'
try: diff_time = ''
log = open(log_path, 'r') if exists(log_path):
except: with open(log_path, 'r', encoding='utf-8') as log:
diff_time = '' exp_log = json.load(log)
else: start_time = exp_log['start_time']
exp_log = json.load(log) end_time = exp_log['end_time']
start_time = exp_log['start_time'] diff_time = (end_time - start_time) / 60 #min
end_time = exp_log['end_time'] diff_time = str(diff_time)
diff_time = (end_time - start_time) / 60 #min
diff_time = str(diff_time)
log.close()
print('%d\t%s' % (cl, diff_time)) print(f'{cl}\t{diff_time}')
...@@ -23,8 +23,6 @@ ...@@ -23,8 +23,6 @@
import json import json
import math import math
import os import os
import pathlib
import shutil
import sys import sys
num_runs = 3 num_runs = 3
...@@ -43,20 +41,18 @@ for bw in types_of_bw: ...@@ -43,20 +41,18 @@ for bw in types_of_bw:
std = 0 std = 0
all_time = [] all_time = []
for i in range(1, num_runs + 1): for i in range(1, num_runs + 1):
log_path = '%sgt-ib-sw-Load-%dm-%d.json' % (basedir, bw, i) log_path = f'{basedir}gt-ib-sw-Load-{bw}m-{i}.json'
if os.path.exists(log_path):
log = open(log_path, 'r')
exp_log = json.load(log)
start_time = exp_log['start_time']
end_time = exp_log['end_time']
diff_time = (end_time - start_time) / 60 #min
total_time += diff_time
all_time.append(diff_time)
diff_time = str(diff_time)
log.close() diff_time = ''
else: if os.path.exists(log_path):
diff_time = '' with open(log_path, 'r', encoding='utf-8') as log:
exp_log = json.load(log)
start_time = exp_log['start_time']
end_time = exp_log['end_time']
diff_time = (end_time - start_time) / 60 #min
total_time += diff_time
all_time.append(diff_time)
diff_time = str(diff_time)
#print('%d\t%s' % (bw, diff_time)) #print('%d\t%s' % (bw, diff_time))
...@@ -69,4 +65,4 @@ for bw in types_of_bw: ...@@ -69,4 +65,4 @@ for bw in types_of_bw:
std = std / num_runs std = std / num_runs
std = math.sqrt(std) std = math.sqrt(std)
#print(str(std)) #print(str(std))
print('%d %s %f' % (bw, avg_time, std)) print(f'{bw} {avg_time} {std}')
...@@ -22,8 +22,6 @@ ...@@ -22,8 +22,6 @@
import json import json
import os import os
import pathlib
import shutil
import sys import sys
# How to use # How to use
...@@ -36,11 +34,12 @@ cmd = ['sleep', 'busy'] ...@@ -36,11 +34,12 @@ cmd = ['sleep', 'busy']
outdir = sys.argv[1] outdir = sys.argv[1]
# pylint: disable=redefined-outer-name
def parse_sim_time(path): def parse_sim_time(path):
ret = {} ret = {}
if not os.path.exists(path): if not os.path.exists(path):
return ret return ret
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
ret['simtime'] = (data['end_time'] - data['start_time']) / 60 ret['simtime'] = (data['end_time'] - data['start_time']) / 60
...@@ -52,11 +51,8 @@ print('mode sleep busy') ...@@ -52,11 +51,8 @@ print('mode sleep busy')
for m in mode: for m in mode:
line = m line = m
for c in cmd: for c in cmd:
path = '%s/%s-%s-1.json' % (outdir, m, c) path = f'{outdir}/{m}-{c}-1.json'
data = parse_sim_time(path) data = parse_sim_time(path)
if 'simtime' in data: t = data.get('simtime', '')
t = data['simtime']
else:
t = ''
line = line + ' ' + f'{t}' line = line + ' ' + f'{t}'
print(line) print(line)
...@@ -22,16 +22,14 @@ ...@@ -22,16 +22,14 @@
import fnmatch import fnmatch
import glob import glob
import itertools
import json import json
import os
import re import re
import sys
def parse_iperf_run(data, skip=1, use=8): def parse_iperf_run(data, skip=1, use=8):
tp_pat = re.compile( tp_pat = re.compile(
r'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*) ([GM])bits.*' r'\[ *\d*\] *([0-9\.]*)- *([0-9\.]*) sec.*Bytes *([0-9\.]*)'
r' ([GM])bits.*'
) )
tps_time = {} tps_time = {}
for hn in fnmatch.filter(data['sims'].keys(), 'host.client.*'): for hn in fnmatch.filter(data['sims'].keys(), 'host.client.*'):
...@@ -47,7 +45,7 @@ def parse_iperf_run(data, skip=1, use=8): ...@@ -47,7 +45,7 @@ def parse_iperf_run(data, skip=1, use=8):
if time >= skip + use: if time >= skip + use:
continue continue
if not time in tps_time: if time not in tps_time:
tps_time[time] = [] tps_time[time] = []
if m.group(4) == 'G': if m.group(4) == 'G':
...@@ -73,7 +71,7 @@ def parse_iperf(basename, skip=1, use=8): ...@@ -73,7 +71,7 @@ def parse_iperf(basename, skip=1, use=8):
# skip checkpoints # skip checkpoints
continue continue
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
result = parse_iperf_run(data, skip, use) result = parse_iperf_run(data, skip, use)
if result is not None: if result is not None:
......
...@@ -30,7 +30,7 @@ def parse_netperf_run(path): ...@@ -30,7 +30,7 @@ def parse_netperf_run(path):
if not os.path.exists(path): if not os.path.exists(path):
return ret return ret
with open(path, 'r') as f: with open(path, 'r', encoding='utf-8') as f:
data = json.load(f) data = json.load(f)
ret['simtime'] = data['end_time'] - data['start_time'] ret['simtime'] = data['end_time'] - data['start_time']
......
...@@ -25,7 +25,7 @@ import os ...@@ -25,7 +25,7 @@ import os
import re import re
def parse_nopaxos_run(num_c, seq, path): def parse_nopaxos_run(num_c, path):
ret = {} ret = {}
ret['throughput'] = None ret['throughput'] = None
...@@ -38,31 +38,31 @@ def parse_nopaxos_run(num_c, seq, path): ...@@ -38,31 +38,31 @@ def parse_nopaxos_run(num_c, seq, path):
if not os.path.exists(path): if not os.path.exists(path):
return ret return ret
f_log = open(path, 'r') with open(path, 'r', encoding='utf-8') as f_log:
log = json.load(f_log) log = json.load(f_log)
total_tput = 0 total_tput = 0
total_avglat = 0 total_avglat = 0
for i in range(num_c): for i in range(num_c):
sim_name = f'host.client.{i}' sim_name = f'host.client.{i}'
#print(sim_name) #print(sim_name)
# in this host log stdout # in this host log stdout
for j in log['sims'][sim_name]['stdout']: for j in log['sims'][sim_name]['stdout']:
#print(j)
m_t = tp_pat.match(j)
m_l = lat_pat.match(j)
if m_l:
#print(j) #print(j)
lat = float(m_l.group(2)) / 1000 # us latency m_t = tp_pat.match(j)
#print(lat) m_l = lat_pat.match(j)
total_avglat += lat if m_l:
#print(j)
lat = float(m_l.group(2)) / 1000 # us latency
#print(lat)
total_avglat += lat
if m_t: if m_t:
n_req = float(m_t.group(2)) n_req = float(m_t.group(2))
n_time = float(m_t.group(3)) n_time = float(m_t.group(3))
total_tput += n_req / n_time total_tput += n_req / n_time
avglat = total_avglat / num_c avglat = total_avglat / num_c
#print(avglat) #print(avglat)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment