Loading README.org +13 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ libraries and database servers. SELECT * FROM foo UPDATE foo SET bar=bar+1 WHERE id=1 * benchmark results * benchmark results on x201 laptop, postgres runs on 5400rpm SATA disk. each entry has format: db_server, compiler, libraries all build is release mode (with -O or equivalent). Loading Loading @@ -163,7 +163,18 @@ https://www.postgresql.org/docs/9.4/static/libpq.html 0.54 28.51 no effect. ** 2019-02-23 on new ryzen5 PC. postgres 9.6 on M2 SSD. openjdk 1.8.0_162, jdbc postgresql 42.2.5 * benchmark result on new ryzen5 PC. postgres runs on M2 SSD. ** 2019-02-23 pg 9.6, python 2.7.13, psycopg2==2.6.2 INFO running benchmark... DEBUG trace_time, func=select_test, duration=0.18 DEBUG trace_time, func=update_test, duration=2.78 -- INFO running benchmark... DEBUG trace_time, func=select_test, duration=0.19 DEBUG trace_time, func=update_test, duration=2.76 ** 2019-02-23 pg 9.6. openjdk 1.8.0_162, jdbc postgresql 42.2.5 warming up JVM... select time cost: 0.29s update time cost: 2.68s Loading python-psycopg2/Makefile 0 → 100644 +3 −0 Original line number Diff line number Diff line run: PG_T1_PASSWORD="62IWgtWiPCZdt8qu" python bench.py .PHONY: run python-psycopg2/bench.py +7 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,13 @@ run db benchmark """ from contextlib import contextmanager import sys import os import logging import psycopg2 from yygame.debug import trace_time from wells.debug import trace_time logging.basicConfig(format='%(levelname)-8s %(message)s', level=logging.DEBUG) logger = logging.getLogger('') Loading @@ -37,10 +39,13 @@ UPDATE foo SET bar=bar+1 WHERE id=1 def main(): password = os.getenv("PG_T1_PASSWORD") if not password: logger.error(u"Please define PG_T1_PASSWORD environment variable") conn = psycopg2.connect(host="localhost", database="t1", user="t1", password="fNfwREMqO69TB9YqE+/OzF5/k+s=") password=password) logger.info("running benchmark...") select_test(conn) update_test(conn) Loading Loading
README.org +13 −2 Original line number Diff line number Diff line Loading @@ -16,7 +16,7 @@ libraries and database servers. SELECT * FROM foo UPDATE foo SET bar=bar+1 WHERE id=1 * benchmark results * benchmark results on x201 laptop, postgres runs on 5400rpm SATA disk. each entry has format: db_server, compiler, libraries all build is release mode (with -O or equivalent). Loading Loading @@ -163,7 +163,18 @@ https://www.postgresql.org/docs/9.4/static/libpq.html 0.54 28.51 no effect. ** 2019-02-23 on new ryzen5 PC. postgres 9.6 on M2 SSD. openjdk 1.8.0_162, jdbc postgresql 42.2.5 * benchmark result on new ryzen5 PC. postgres runs on M2 SSD. ** 2019-02-23 pg 9.6, python 2.7.13, psycopg2==2.6.2 INFO running benchmark... DEBUG trace_time, func=select_test, duration=0.18 DEBUG trace_time, func=update_test, duration=2.78 -- INFO running benchmark... DEBUG trace_time, func=select_test, duration=0.19 DEBUG trace_time, func=update_test, duration=2.76 ** 2019-02-23 pg 9.6. openjdk 1.8.0_162, jdbc postgresql 42.2.5 warming up JVM... select time cost: 0.29s update time cost: 2.68s Loading
python-psycopg2/Makefile 0 → 100644 +3 −0 Original line number Diff line number Diff line run: PG_T1_PASSWORD="62IWgtWiPCZdt8qu" python bench.py .PHONY: run
python-psycopg2/bench.py +7 −2 Original line number Diff line number Diff line Loading @@ -6,11 +6,13 @@ run db benchmark """ from contextlib import contextmanager import sys import os import logging import psycopg2 from yygame.debug import trace_time from wells.debug import trace_time logging.basicConfig(format='%(levelname)-8s %(message)s', level=logging.DEBUG) logger = logging.getLogger('') Loading @@ -37,10 +39,13 @@ UPDATE foo SET bar=bar+1 WHERE id=1 def main(): password = os.getenv("PG_T1_PASSWORD") if not password: logger.error(u"Please define PG_T1_PASSWORD environment variable") conn = psycopg2.connect(host="localhost", database="t1", user="t1", password="fNfwREMqO69TB9YqE+/OzF5/k+s=") password=password) logger.info("running benchmark...") select_test(conn) update_test(conn) Loading