pytest-xdist
pytest-xdist copied to clipboard
Print out time taken by each file when when using `loadfile`
We are using --dist loadfile to distribute tests, and it is working well. We suspect some of our files are taking a long time, but have no good way to verify. We are using --verbose, so we get setup/run/teardown times, but don't have a 100% sure way of counting time elapsed by each file.
It would be nice if, at the end of the run, xdist would output the name of each file, and the total time taken by the file.
Did you try using --durations? It gives the time taken by test, not by file, but that might be enough for your use case.
I'll give that a try. That would still take manual tallying; I was looking for something that would avoid that step. :)