add a measurement for login/tls
This commit is contained in:
parent
b05154b818
commit
a0e1d9e4d7
26
scripts/measure_tls_and_logins.py
Normal file
26
scripts/measure_tls_and_logins.py
Normal file
@ -0,0 +1,26 @@
|
||||
|
||||
import time
|
||||
|
||||
import imaplib
|
||||
|
||||
NUM_CONNECTIONS=10
|
||||
|
||||
conns = []
|
||||
|
||||
start = time.time()
|
||||
for i in range(NUM_CONNECTIONS):
|
||||
print(f"opening connection {i}")
|
||||
conn = imaplib.IMAP4_SSL("c3.testrun.org")
|
||||
conns.append(conn)
|
||||
|
||||
tlsdone = time.time()
|
||||
duration = tlsdone-start
|
||||
print(f"{duration}: TLS connections opening TLS connections")
|
||||
|
||||
for i, conn in enumerate(conns):
|
||||
print(f"logging into connection {i}")
|
||||
conn.login(f"measure{i}", "pass")
|
||||
|
||||
logindone = time.time()
|
||||
duration = logindone - tlsdone
|
||||
print(f"{duration}: LOGINS done")
|
Loading…
Reference in New Issue
Block a user