ITADN

Support multiple requests

#104Pull RequestStevemoretz 创建于 2023-09-15
S
Stevemoretzcommented
I use this tool specially in unit tests, and in unit tests sometimes you end up having multiple requests in a test (This isn't specifically related to unit tests, internal API calls for instance would suffer from the same problem.), your package was counting the previous queries from the previous requests in, causing it to think n+1 queries exists since repeated queries exist regardless of the fact that those queries had happened in a different context (in the previous requests) so I made sure your package won't register multiple listeners or count in the stale queries from previous attempts. So that's what this pull request does, 2 tests are written to ensure now multiple requests will work for detecting the n+1 queries and not detecting regular queries as n+1 queries. That's all folks, that's in advance for considering this pull request.
合并状态:未合并 关闭于 2023-12-01 1 条评论