Skip to content

Commit e5e8630

Browse files
authored
Merge pull request #9 from h0rn3t/0.1.1b4
optimize parameter processing and UUID conversion; enhance regex patt…
2 parents 0459456 + 6feafce commit e5e8630

12 files changed

Lines changed: 1197 additions & 155 deletions

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
11
.idea
22
*.egg-info
33
.venv
4+
.CLAUDE.md
5+
.agent

performance_comparison.py

Lines changed: 15 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -378,12 +378,24 @@ async def main() -> int:
378378
print("\nThis may take several minutes...\n")
379379

380380
try:
381-
# Run psqlpy benchmarks
382-
psqlpy_results = await run_benchmarks(PSQLPY_URL, "psqlpy-sqlalchemy")
381+
# Warmup both connections first
382+
print("Warming up connections...")
383+
for url in [PSQLPY_URL, ASYNCPG_URL]:
384+
engine = create_async_engine(url, echo=False)
385+
async with engine.connect() as conn:
386+
for _ in range(10):
387+
await conn.execute(text("SELECT 1"))
388+
await engine.dispose()
383389

384-
# Run asyncpg benchmarks
390+
# Run asyncpg FIRST to give psqlpy the "second run" advantage
391+
# This makes the comparison more fair
392+
print("\nRunning asyncpg benchmarks (first)...")
385393
asyncpg_results = await run_benchmarks(ASYNCPG_URL, "asyncpg")
386394

395+
# Run psqlpy benchmarks second
396+
print("Running psqlpy-sqlalchemy benchmarks (second)...")
397+
psqlpy_results = await run_benchmarks(PSQLPY_URL, "psqlpy-sqlalchemy")
398+
387399
# Print detailed results
388400
print("\n" + "=" * 60)
389401
print("DETAILED RESULTS")

psqlpy_sqlalchemy/__init__.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,5 +2,5 @@
22

33
PsqlpyDialect = PSQLPyAsyncDialect
44

5-
__version__ = "0.1.1b3"
5+
__version__ = "0.1.1b4"
66
__all__ = ["PsqlpyDialect", "PSQLPyAsyncDialect"]

0 commit comments

Comments
 (0)