Skip to content

Add queryspy to Profilers - #82

Open
rodrigobnogueira wants to merge 1 commit into
dahlia:mainfrom
rodrigobnogueira:add-queryspy
Open

rodrigobnogueira wants to merge 1 commit into
dahlia:mainfrom
rodrigobnogueira:add-queryspy

Conversation

@rodrigobnogueira

Copy link
Copy Markdown

N+1 and query-budget detection for SQLAlchemy 2.0, sync and async. It reports the line of application code responsible and the loader option that fixes it, and ships pytest assertions, an ASGI middleware with a per-request debug panel, and SARIF output for GitHub code scanning.

Placed next to nplusone, the closest existing entry. It differs in being SQLAlchemy-only, built on the public do_orm_execute event rather than patching ORM internals, and supporting AsyncSession. It does not detect unused eager loading, which nplusone does — SQLAlchemy exposes no read event for an already-loaded attribute.

Disclosure: I wrote it.

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.

1 participant