Update process.py

This commit is contained in:
Torma Kristóf 2019-05-06 18:53:37 +02:00 committed by GitHub
parent cddb70cd62
commit 1f6015b5b4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -34,16 +34,22 @@ def processFile(fname):
else:
responseCodes[code]=responseCodes[code]+1
responseTimes.append(item['response-time'])
maxResponse=max(responseTimes)
minResponse=min(responseTimes)
if len(responseTimes)!=0:
maxResponse=max(responseTimes)
minResponse=min(responseTimes)
print("Maximum response time was ",maxResponse)
print("Minimum response time was ",minResponse)
else:
print("csv is empty")
pprint(responseCodes)
for sec in responsePerSec:
print(sec, ":")
print(" Maximum:", max(responsePerSec[sec]))
print(" Minimum:", min(responsePerSec[sec]))
print(" Num of responses:", len(responsePerSec[sec]))
if len(responsePerSec[sec])!=0:
print(sec, ":")
print(" Maximum:", max(responsePerSec[sec]))
print(" Minimum:", min(responsePerSec[sec]))
print(" Num of responses:", len(responsePerSec[sec]))
else:
print(" empty")
def processAllFiles():
files=getFiles()