mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-02 07:18:25 +01:00
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:
@@ -35,6 +35,7 @@ def profile(enable, dump):
|
||||
|
||||
yield
|
||||
|
||||
prof.disable()
|
||||
if not dump:
|
||||
prof.print_stats(sort="cumtime")
|
||||
return
|
||||
|
||||
Reference in New Issue
Block a user