Closed Jordan-Dennis closed 1 year ago
Another alternative is pytest-timer
which looks very polished.
This is a screenshot of using pytest-durations
on the TolimanOptics
tests.
This is using pytest-timer
which I think is a little nicer.
I found pytest-timer
the better of the pair because it has more features and is colored. The report is less detailed but it is still good enough for finding bottlenecks.
Hi all, I think that this plugin will provide useful information that
pytest-benchmark
will not. We will only benchmark mission criticall function calls like__call__
ect. Duration simply times the tests. This links back to the F.I.R.S.T principles in that it will show us what tests are taking a lng time to executre. We can then mark these tests withpytest.mark.slow()
, and run them as a separate group providing that the faster tests passed. Regards Jordan.