diff --git a/frappe/recorder.py b/frappe/recorder.py index e47a064d2c..b26cf1e0e3 100644 --- a/frappe/recorder.py +++ b/frappe/recorder.py @@ -252,9 +252,7 @@ class Recorder: if self.config.profile or self.profiler: self.profiler.disable() profiler_output = io.StringIO() - pstats.Stats(self.profiler, stream=profiler_output).strip_dirs().sort_stats( - "cumulative" - ).print_stats(200) + pstats.Stats(self.profiler, stream=profiler_output).sort_stats("cumulative").print_stats(200) profile = profiler_output.getvalue() profiler_output.close() return profile