Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
.idea
*.egg-info
.venv
.CLAUDE.md
.agent
18 changes: 15 additions & 3 deletions performance_comparison.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,12 +378,24 @@ async def main() -> int:
print("\nThis may take several minutes...\n")

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

# Run asyncpg benchmarks
# Run asyncpg FIRST to give psqlpy the "second run" advantage
# This makes the comparison more fair
print("\nRunning asyncpg benchmarks (first)...")
asyncpg_results = await run_benchmarks(ASYNCPG_URL, "asyncpg")

# Run psqlpy benchmarks second
print("Running psqlpy-sqlalchemy benchmarks (second)...")
psqlpy_results = await run_benchmarks(PSQLPY_URL, "psqlpy-sqlalchemy")

# Print detailed results
print("\n" + "=" * 60)
print("DETAILED RESULTS")
Expand Down
2 changes: 1 addition & 1 deletion psqlpy_sqlalchemy/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@

PsqlpyDialect = PSQLPyAsyncDialect

__version__ = "0.1.1b3"
__version__ = "0.1.1b4"
__all__ = ["PsqlpyDialect", "PSQLPyAsyncDialect"]
Loading
Loading