Warn if collection spends >5s traversing a directory without collecting any tests #12312
Labels
topic: collection
related to the collection phase
topic: reporting
related to terminal output and user-facing messages and errors
type: performance
performance or memory problem/improvement
I recently saw #5851 (comment), which made me wonder if we could automatically detect similar cases and suggest using the
--ignore
flag ornorecursedirs
config option.Tracking the time spent in collection on a per-directory basis and whether any test files were collected should be pretty straightforward, and from there it's just the reporting code. Specifically: depth-first search over the tree, don't recurse into children if the current node triggered the warning or took <= 5s. Alternatively, maybe this could be integrated with the collection code so that we don't need a separate step.
The text was updated successfully, but these errors were encountered: