pytest-xdist icon indicating copy to clipboard operation
pytest-xdist copied to clipboard

Print out time taken by each file when when using `loadfile`

Open jkugler opened this issue 2 years ago • 2 comments

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.

jkugler avatar Dec 05 '23 21:12 jkugler

Did you try using --durations? It gives the time taken by test, not by file, but that might be enough for your use case.

nicoddemus avatar Dec 06 '23 10:12 nicoddemus

I'll give that a try. That would still take manual tallying; I was looking for something that would avoid that step. :)

jkugler avatar Dec 06 '23 17:12 jkugler