Compare commits
No commits in common. "5b5d00e20553ec939405e6beeff7a35e55d68ad8" and "533855b1888ee997be95da3a0aa97f61c23168ec" have entirely different histories.
5b5d00e205
...
533855b188
21
Results
21
Results
|
@ -12,24 +12,3 @@ trintignant:~/wrk/database_connect_bench 22:30 :-) 1084% time ./dcb_perl_psql
|
||||||
0.00405609997687861 session 2
|
0.00405609997687861 session 2
|
||||||
./dcb_perl_psql 0.07s user 0.00s system 90% cpu 0.079 total
|
./dcb_perl_psql 0.07s user 0.00s system 90% cpu 0.079 total
|
||||||
|
|
||||||
rorschach:~database_connect_bench 0:12 :-) 1094% time ./dcb_python_mysql --database=simba --user=simba --password=EilaeC2j
|
|
||||||
0.045608792919665575 import
|
|
||||||
0.0019447151571512222 connect
|
|
||||||
0.04812890104949474 total
|
|
||||||
0.0025201081298291683 session
|
|
||||||
./dcb_python_mysql --database=simba --user=simba --password=EilaeC2j 0.07s user 0.00s system 98% cpu 0.076 total
|
|
||||||
|
|
||||||
rorschach:~database_connect_bench 0:13 :-) 1096% time ./dcb_python_psql
|
|
||||||
0.02288187202066183 import
|
|
||||||
0.002370147965848446 connect
|
|
||||||
0.02572862897068262 total
|
|
||||||
0.00284675695002079 session
|
|
||||||
./dcb_python_psql 0.06s user 0.01s system 96% cpu 0.073 total
|
|
||||||
|
|
||||||
rorschach:~database_connect_bench 0:14 :-) 1099% time ./dcb_perl_psql
|
|
||||||
0.0135266068391502 connect 1
|
|
||||||
0.0138464076444507 session 1
|
|
||||||
0.00222978228703141 connect 2
|
|
||||||
0.00254458002746105 session 2
|
|
||||||
./dcb_perl_psql 0.05s user 0.01s system 93% cpu 0.068 total
|
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
#!/usr/bin/perl
|
#!/usr/bin/perl
|
||||||
use v5.28;
|
use v5.30;
|
||||||
use warnings;
|
use warnings;
|
||||||
|
|
||||||
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
|
use Time::HiRes qw(clock_gettime CLOCK_MONOTONIC);
|
||||||
|
|
|
@ -1,27 +0,0 @@
|
||||||
#!/usr/bin/python3
|
|
||||||
import argparse
|
|
||||||
import time
|
|
||||||
|
|
||||||
ap = argparse.ArgumentParser()
|
|
||||||
ap.add_argument("--database")
|
|
||||||
ap.add_argument("--user")
|
|
||||||
ap.add_argument("--password")
|
|
||||||
args = ap.parse_args()
|
|
||||||
|
|
||||||
t0 = time.monotonic()
|
|
||||||
|
|
||||||
import mysql.connector
|
|
||||||
|
|
||||||
t1 = time.monotonic()
|
|
||||||
db = mysql.connector.connect(database=args.database, user=args.user, password=args.password)
|
|
||||||
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