per sec
This commit is contained in:
parent
442c1ddef7
commit
be0eaa71bd
@ -25,9 +25,9 @@ def processFile(fname):
|
|||||||
item[name]=value.strip()
|
item[name]=value.strip()
|
||||||
sec=int(item['offset'].split('.')[0])
|
sec=int(item['offset'].split('.')[0])
|
||||||
if sec not in responsePerSec:
|
if sec not in responsePerSec:
|
||||||
responsePerSec[sec]=1
|
responsePerSec[sec]=[]
|
||||||
else:
|
else:
|
||||||
responsePerSec[sec]=responsePerSec[sec]+1
|
responsePerSec[sec].append(item['response-time'])
|
||||||
code=item['status-code']
|
code=item['status-code']
|
||||||
if code not in responseCodes:
|
if code not in responseCodes:
|
||||||
responseCodes[code]=1
|
responseCodes[code]=1
|
||||||
@ -39,7 +39,11 @@ def processFile(fname):
|
|||||||
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)
|
||||||
pprint(responsePerSec)
|
for sec in responsePerSec:
|
||||||
|
print(sec, ":")
|
||||||
|
print(" Maximum:", max(responsePerSec[sec]))
|
||||||
|
print(" Minimum:", min(responsePerSec[sec]))
|
||||||
|
print(" Num of responses:", len(responsePerSec[sec]))
|
||||||
|
|
||||||
def processAllFiles():
|
def processAllFiles():
|
||||||
files=getFiles()
|
files=getFiles()
|
||||||
|
Loading…
Reference in New Issue
Block a user