From 280b06003f5da37e70e7acb66f023121f92260b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9s=20Delfino?= Date: Sat, 28 Jul 2018 07:01:24 -0300 Subject: [PATCH] bpo-5978: Document that profiling needs cmd/function to return (GH-7938) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit https://bugs.python.org/issue5978 (cherry picked from commit 937fb55d35373fd2701078251840b6be0465a6e1) Co-authored-by: Andrés Delfino --- Doc/library/profile.rst | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Doc/library/profile.rst b/Doc/library/profile.rst index 3f3c8a94856273..926d7757e8eb34 100644 --- a/Doc/library/profile.rst +++ b/Doc/library/profile.rst @@ -297,6 +297,11 @@ functions: Profile ``func(*args, **kwargs)`` +Note that profiling will only work if the called command/function actually +returns. If the interpreter is terminated (e.g. via a :func:`sys.exit` call +during the called command/function execution) no profiling results will be +printed. + .. _profile-stats: The :class:`Stats` Class