remote: use perf_counter() to measure duration, not time()
`time()` is not monotonic and is not appropriate for measuring duration.
This commit is contained in:
@@ -175,9 +175,9 @@ class WorkerInteractor:
|
|||||||
|
|
||||||
worker_title("[pytest-xdist running] %s" % item.nodeid)
|
worker_title("[pytest-xdist running] %s" % item.nodeid)
|
||||||
|
|
||||||
start = time.time()
|
start = time.perf_counter()
|
||||||
self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
|
self.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
|
||||||
duration = time.time() - start
|
duration = time.perf_counter() - start
|
||||||
|
|
||||||
worker_title("[pytest-xdist idle]")
|
worker_title("[pytest-xdist idle]")
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user