<div dir="ltr">Hi,<div><br></div><div>I&#39;m using py.test to run interface and high-level tests for a C++ library (Win7, via a python interface). <br>I am also using the timings coming from the junit-xml output to do some statistical analysis <br>
that should detect any performance degradations. One other thing I am concerned about though<br>is memory usage - as the actual memory-allocating code is written in C++.</div><div><br></div><div>Does anyone know of an approach that would give me memory usage statistics while running the<br>
tests? I thought about changing the assert statements to first log the memory usage of the process<br>before doing the actual assert, using something like psutil, but I am not sure whether this will give a <br>useful metric? One key question there is whether py.test - in single-process mode - will always run <br>
the tests in the same order unless tests are added/removed?</div><div><br></div><div>I welcome any suggestions on alternative approaches.</div><div><br></div><div>Thanks,</div><div>Thomas</div></div>