Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我在 python 中有两个程序做同样的事情,在行分析器中,某个测试的一个程序比另一个更快,但在 pytest --durations(对于这个特定的测试)是反之亦然。有人可以解释这种行为吗?我需要知道某些测试的执行时间。
在测试中运行 line-profiler 进行比较可能很有用。我写了一个可能有帮助的插件。非常欢迎反馈。