V
vincent delft
I want to write a script that will monitore the performance of a web
application delivering HTTP and HTTPS pages.
I would like to know the best way to do it...
By reading Python Doc. I've found the following:
For HTTP:
def http_monitor(host,url):
starttts=time.time()
conn=httplib.HTTPConnection(host)
conn.request("get","/%s" % url)
res=conn.getresponse()
data=res.read()
return time.time()-starttts
Where Host and URL concerns an HTTP web page.
For HTTPS:
def https_monitor(host,url):
starttts=time.time()
conn=httplib.HTTPSConnection(host)
conn.request("get","/%s" % url)
res=conn.getresponse()
data=res.read()
return time.time()-starttts
Where Host and URL concerns an HTTPS web page.
Does this is valid ?
For HTTPS, I'm not dealing with encryption Key ... is it normal ?
Thanks.
application delivering HTTP and HTTPS pages.
I would like to know the best way to do it...
By reading Python Doc. I've found the following:
For HTTP:
def http_monitor(host,url):
starttts=time.time()
conn=httplib.HTTPConnection(host)
conn.request("get","/%s" % url)
res=conn.getresponse()
data=res.read()
return time.time()-starttts
Where Host and URL concerns an HTTP web page.
For HTTPS:
def https_monitor(host,url):
starttts=time.time()
conn=httplib.HTTPSConnection(host)
conn.request("get","/%s" % url)
res=conn.getresponse()
data=res.read()
return time.time()-starttts
Where Host and URL concerns an HTTPS web page.
Does this is valid ?
For HTTPS, I'm not dealing with encryption Key ... is it normal ?
Thanks.