Repository navigation
Add a load test and PostgreSQL support, and fix pool stalls under load - #10
Merged
Merged
Conversation
…load - Locust load test over stored-report pages, API, history and badges (no GitHub calls), with measured latency published in the README - DATABASE_URL accepts postgresql:// and postgres:// (psycopg 3, optional extra); CI job test-postgres runs migrations (up, down, up) and the suite on PostgreSQL 16; docker-compose.yml for a local database; TEST_DATABASE_URL for the tests - Fix: SQLite connection pool ran dry at 50 concurrent visitors (30 s stalls); SQLite now uses a connection per session, PostgreSQL a sized pool, and read-only handlers are plain def so they run in the thread pool - Fix: ids above 2^31 returned a server error on PostgreSQL instead of not found
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
A Locust load test against seeded reports (no GitHub calls), with measured numbers in the README: 20 users p50 21 ms / p95 79 ms; 50 users p50 120 ms / p95 510 ms; 0 failures.
DATABASE_URLworks with PostgreSQL (psycopg 3, optional extra), atest-postgresCI job and a localdocker-compose.yml. Fixes two bugs the load test and Postgres found: 30 s stalls at 50 users (pool exhaustion from blocking DB calls in async handlers), and a 500 for ids above 2^31 on Postgres.Study first:
docs/walkthroughs/03-performance-and-postgres.md.Tests: 316 to 328 (also 328 on PostgreSQL 16). Stacked on the Action PR.