fix format
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
Torma Kristóf 2020-10-23 17:17:55 +02:00
parent 653f3ebab4
commit 8944113b1c
Signed by: tormakris
GPG Key ID: DC83C4F2C41B1047

View File

@ -166,11 +166,11 @@ class BirbAnalyzer(CsvAnalyzer):
item = {}
for (name, value) in items:
item[name] = value.strip()
sec = item['fire_time']
sec = datetime.datetime.strptime(item['http_start_time'], '%Y-%m-%dT%H:%M:%S.%f').strftime("%H:%M:%S")
if sec not in responsepersec:
responsepersec[sec] = []
else:
responsepersec[sec].append(int(item['latency']))
responsepersec[sec].append(float(item['rtt']))
self.walkresponsepersec(responsepersec, shouldprint)
@ -204,12 +204,12 @@ class InputAnalyzer(CsvAnalyzer):
item = {}
for (name, value) in items:
item[name] = value.strip()
sec = item['fire_time']
sec = datetime.datetime.strptime(item['http_start_time'], '%Y-%m-%dT%H:%M:%S.%f')
if sec not in responsepersec:
responsepersec[sec] = []
else:
firetime = datetime.datetime.strptime(sec, '%Y-%m-%dT%H:%M:%S')
responsearrivetime = datetime.datetime.strptime(item['response_arrive_time'],
firetime = datetime.datetime.strptime(item['http_start_time'], '%Y-%m-%dT%H:%M:%S.%f')
responsearrivetime = datetime.datetime.strptime(item['http_complete_time'],
"%Y-%m-%dT%H:%M:%S.%f")
latency = responsearrivetime - firetime
responsepersec[sec].append(int(latency.total_seconds() * 1000))