Skip to content

Add new test /pgdb and one test implementation with expressJS#162

Merged
MDA2AV merged 3 commits intomainfrom
feat/new-test-pgdb
Mar 26, 2026
Merged

Add new test /pgdb and one test implementation with expressJS#162
MDA2AV merged 3 commits intomainfrom
feat/new-test-pgdb

Conversation

@MDA2AV
Copy link
Copy Markdown
Owner

@MDA2AV MDA2AV commented Mar 26, 2026

Key details

  • Postgres starts once before the profile loop, not per connection count. The
    100K-row seed loads in ~2 seconds via COPY.
  • Only started when needed — if the framework doesn't have async-db in its
    meta.json tests, Postgres is never started.
  • DATABASE_URL is only passed for the pgdb profile — other profiles
    (baseline, json, etc.) don't get it, so existing endpoints are unaffected.
  • Validation uses a Docker network instead of --network host (because
    validate.sh uses port mapping). The framework and Postgres containers join
    httparena-validate-net so they can reach each other by container name.

@MDA2AV MDA2AV linked an issue Mar 26, 2026 that may be closed by this pull request
Copy link
Copy Markdown
Collaborator

@BennyFranciscus BennyFranciscus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is really well thought out 👏

A few things I like:

  • No index on price — forcing a sequential scan is a great way to stress actual query throughput vs just index lookups. Makes it a real async I/O test rather than a "who has the fastest btree" contest.
  • JSONB for tags, native BOOLEAN for active — cleaner than the SQLite version where you had to parse JSON strings and convert 0/1. Frameworks get to focus on what matters (async driver + pooling), not fighting type mismatches.
  • The check_header semicolon fix$expected_value;* accepting application/json; charset=utf-8 is a nice QoL improvement. Would have saved some pain on the drogon PR.
  • Anti-cheat empty range check — simple but effective.
  • engineScored: false in the composite leaderboard — correct call.

The benchmark/validate Postgres sidecar setup with the readiness loop is clean. Docker network for validate vs host networking for benchmark makes sense.

Express reference implementation with max: 16 pool size looks reasonable as a starting point.

One minor thought: the docs say "Recommended pool size: number of CPU cores or 16–32 connections" — might want to note that some async drivers (like asyncpg) perform better with smaller pools since each connection can multiplex, while thread-per-connection drivers need larger pools. But that's docs polish, not a blocker.

Looks good to merge! Excited to see how different frameworks stack up on this one.

@MDA2AV MDA2AV merged commit 0c4c4d8 into main Mar 26, 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.

[DB] This test needs to be completely redone!

2 participants