Add Python/PostgreSQL version
This commit is contained in:
parent
396b22a87b
commit
2e3f11587e
|
@ -0,0 +1,20 @@
|
||||||
|
#!/usr/bin/python3
|
||||||
|
import time
|
||||||
|
|
||||||
|
t0 = time.monotonic()
|
||||||
|
|
||||||
|
import psycopg2
|
||||||
|
|
||||||
|
t1 = time.monotonic()
|
||||||
|
db = psycopg2.connect("")
|
||||||
|
t2 = time.monotonic()
|
||||||
|
csr = db.cursor()
|
||||||
|
csr.execute("select current_timestamp")
|
||||||
|
r = csr.fetchall()
|
||||||
|
t3 = time.monotonic()
|
||||||
|
db.close()
|
||||||
|
t4 = time.monotonic()
|
||||||
|
print(t1 - t0, "import")
|
||||||
|
print(t2 - t1, "connect")
|
||||||
|
print(t4 - t0, "total")
|
||||||
|
print(t4 - t1, "session")
|
Loading…
Reference in New Issue