This commit is contained in:
parent
653f3ebab4
commit
8944113b1c
@ -166,11 +166,11 @@ class BirbAnalyzer(CsvAnalyzer):
|
|||||||
item = {}
|
item = {}
|
||||||
for (name, value) in items:
|
for (name, value) in items:
|
||||||
item[name] = value.strip()
|
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:
|
if sec not in responsepersec:
|
||||||
responsepersec[sec] = []
|
responsepersec[sec] = []
|
||||||
else:
|
else:
|
||||||
responsepersec[sec].append(int(item['latency']))
|
responsepersec[sec].append(float(item['rtt']))
|
||||||
self.walkresponsepersec(responsepersec, shouldprint)
|
self.walkresponsepersec(responsepersec, shouldprint)
|
||||||
|
|
||||||
|
|
||||||
@ -204,12 +204,12 @@ class InputAnalyzer(CsvAnalyzer):
|
|||||||
item = {}
|
item = {}
|
||||||
for (name, value) in items:
|
for (name, value) in items:
|
||||||
item[name] = value.strip()
|
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:
|
if sec not in responsepersec:
|
||||||
responsepersec[sec] = []
|
responsepersec[sec] = []
|
||||||
else:
|
else:
|
||||||
firetime = datetime.datetime.strptime(sec, '%Y-%m-%dT%H:%M:%S')
|
firetime = datetime.datetime.strptime(item['http_start_time'], '%Y-%m-%dT%H:%M:%S.%f')
|
||||||
responsearrivetime = datetime.datetime.strptime(item['response_arrive_time'],
|
responsearrivetime = datetime.datetime.strptime(item['http_complete_time'],
|
||||||
"%Y-%m-%dT%H:%M:%S.%f")
|
"%Y-%m-%dT%H:%M:%S.%f")
|
||||||
latency = responsearrivetime - firetime
|
latency = responsearrivetime - firetime
|
||||||
responsepersec[sec].append(int(latency.total_seconds() * 1000))
|
responsepersec[sec].append(int(latency.total_seconds() * 1000))
|
||||||
|
Loading…
Reference in New Issue
Block a user