fasterer
This commit is contained in:
parent
cb3885158a
commit
8296c923cd
@ -26,9 +26,7 @@ def processFile(fname):
|
|||||||
def processor(lines):
|
def processor(lines):
|
||||||
responseCodes={}
|
responseCodes={}
|
||||||
responsePerSec={}
|
responsePerSec={}
|
||||||
responseTimes=[line['response-time'] for line in lines]
|
responseTimes=[]
|
||||||
maxResponse=max(responseTimes)
|
|
||||||
minResponse=min(responseTimes)
|
|
||||||
for line in lines:
|
for line in lines:
|
||||||
sec=int(line['offset'].split('.')[0])
|
sec=int(line['offset'].split('.')[0])
|
||||||
if sec not in responsePerSec:
|
if sec not in responsePerSec:
|
||||||
@ -40,6 +38,9 @@ def processor(lines):
|
|||||||
responseCodes[code]=1
|
responseCodes[code]=1
|
||||||
else:
|
else:
|
||||||
responseCodes[code]=responseCodes[code]+1
|
responseCodes[code]=responseCodes[code]+1
|
||||||
|
responseTimes.append(line['response-time'])
|
||||||
|
maxResponse=max(responseTimes)
|
||||||
|
minResponse=min(responseTimes)
|
||||||
print("Maximum response time was ",maxResponse)
|
print("Maximum response time was ",maxResponse)
|
||||||
print("Minimum response time was ",minResponse)
|
print("Minimum response time was ",minResponse)
|
||||||
pprint(responseCodes)
|
pprint(responseCodes)
|
||||||
|
Loading…
Reference in New Issue
Block a user