Disable cprofile on exit of the contextmanager profile (#4542)

Does not change anything, it's good to disable it just after yield to not show other stats by accident.
This commit is contained in:
Saugat Pachhai
2020-09-07 14:50:36 +05:45
committed by GitHub
parent d1cc143ef2
commit 131099750e
+1
View File
@@ -35,6 +35,7 @@ def profile(enable, dump):
yield
prof.disable()
if not dump:
prof.print_stats(sort="cumtime")
return