I use this method on my own test subclasses, and I find it useful as a
tripwire: a cause for review and consideration, more than a hard error. Did
the number of queries go up on this change? Is that reasonable or a
mistake? Have we blown the perf budget so we should refactor? Or maybe the
number should just be raised to something that seems like a reasonable next
tripwire.

These limits aren't flaky or false positives, so they seem useful supports
given a reasonable test suite otherwise.
On Aug 17, 2014 8:20 AM, "Florian Apolloner" <[email protected]> wrote:

> I am not so convinced, what would you put in as the upper limit? While
> preventing n+1, it still requires you to know what n in this testcase is
> and changing n can lead to funny errors. Currently we are documenting
> (hopefully) how those query counts come together, so it's clear what's
> happening when it breaks…
>
> On Sunday, August 17, 2014 4:39:17 PM UTC+2, James Bennett wrote:
>>
>> I like the idea -- if nothing else, it would provide an easy way to have
>> a test suite discover N+1 problems, especially in templates.
>>
>> Not sure about the feasibility, though; would you be willing to work up a
>> rough implementation of it?
>>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django developers" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> To post to this group, send email to [email protected].
> Visit this group at http://groups.google.com/group/django-developers.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-developers/41676693-480d-4dfc-82a6-377da0f54057%40googlegroups.com
> <https://groups.google.com/d/msgid/django-developers/41676693-480d-4dfc-82a6-377da0f54057%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/CAM0i3f7nC_hVDwL2MojcQn3Qhex8TGPZnYwdYh%3DTH%2BcWN1yZ6w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to