mirror of
https://github.com/python/cpython.git
synced 2026-06-05 01:10:53 +00:00
gh-150114: Log the memory usage in regrtest in sequential mode (#150264)
This commit is contained in:
parent
b770b2350e
commit
4e3ead92ca
1 changed files with 6 additions and 1 deletions
|
|
@ -27,7 +27,7 @@
|
|||
printlist, get_temp_dir, get_work_dir, exit_timeout,
|
||||
display_header, cleanup_temp_dir, print_warning,
|
||||
is_cross_compiled, get_host_runner, display_title,
|
||||
EXIT_TIMEOUT)
|
||||
get_process_memory_usage, EXIT_TIMEOUT)
|
||||
|
||||
|
||||
class Regrtest:
|
||||
|
|
@ -393,7 +393,12 @@ def run_test(
|
|||
|
||||
return result
|
||||
|
||||
def _get_mem_usage(self):
|
||||
return get_process_memory_usage(os.getpid())
|
||||
|
||||
def run_tests_sequentially(self, runtests: RunTests) -> None:
|
||||
if not self.pgo:
|
||||
self.logger.get_mem_usage = self._get_mem_usage
|
||||
if self.coverage:
|
||||
tracer = trace.Trace(trace=False, count=True)
|
||||
else:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue