line profiler vs pytest --durations

259 Views Asked by At

I have two programs in python which do the same thing, in line profiler one program for certain test is faster than another but in pytest --durations(for this certain test) is viceversa. Can somebody explain that behaviour.I need know execution time for certain test.

1

There are 1 best solutions below

0
On

Maybe could be useful to run line-profiler inside your tests to compare. I wrote a plugin that may help. Feedback is very welcome.