Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Warn on query-intensive tests #752

Open
lukasjuhrich opened this issue Sep 18, 2024 · 0 comments
Open

Warn on query-intensive tests #752

lukasjuhrich opened this issue Sep 18, 2024 · 0 comments

Comments

@lukasjuhrich
Copy link
Collaborator

In this snippet, I've outlined a query plugin for pytest which gives a warning for tests which use more than 10 queries (threshold is configurable using pytest.mark.max_queries(N).

image

This would give us the ability to proactively guard against N+1 queries and implement appropriate prefetching.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant