Skip to content

feat: add database performance evaluation - #45

Merged
HoungDev merged 2 commits into
mainfrom
agent/database-performance-evaluation
Aug 11, 2026
Merged

feat: add database performance evaluation#45
HoungDev merged 2 commits into
mainfrom
agent/database-performance-evaluation

Conversation

@HoungDev

@HoungDev HoungDev commented Aug 11, 2026

Copy link
Copy Markdown
Owner

Summary

  • add a reproducible PostgreSQL benchmark harness for the maintained synchronous SQLAlchemy path and an isolated asyncpg prototype
  • report throughput, median/p95/p99 latency, errors, connection acquisition time, and bounded pool activity in machine-readable JSON
  • add deterministic, removable fixtures with fail-closed local/test database safeguards
  • verify sync/async connectivity and async transaction rollback in tests and CI
  • document the controlled comparison methodology and record the v1.3.0 decision to retain synchronous SQLAlchemy

Why

Issue #44 requires evidence before changing the persistence architecture. The project had no repeatable sync baseline, no apples-to-apples async prototype, and no stable result artifact. This PR adds that evaluation boundary without changing production sessions, API contracts, authentication, outbox behavior, or package version.

CI smoke timing is used for correctness only. Shared-runner timing is not treated as production performance evidence.

Impact

The production application remains synchronous. asyncpg is a development-only dependency and the prototype is not imported during application startup. Benchmark fixtures are confined to the fastapi_benchmark schema and the CLI refuses non-local or ambiguously named databases.

Validation

GitHub Actions CI run #94 passed:

  • Ruff lint and formatting
  • PostgreSQL 17 migrations and 246 tests
  • sync/async database benchmark smoke with zero errors
  • async transaction rollback probe and fixture cleanup
  • coverage and machine-readable benchmark artifacts
  • dependency audit with no known vulnerabilities
  • source distribution, wheel build, and isolated wheel smoke test

Local validation also covered Python compilation, benchmark CLI/import checks, documentation links, package build, wheel smoke, and dependency audit.

Closes #44

@HoungDev
HoungDev marked this pull request as ready for review August 11, 2026 03:09
@HoungDev
HoungDev merged commit fae4cc1 into main Aug 11, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Evaluate database performance and decide on async SQLAlchemy adoption

1 participant