equal
deleted
inserted
replaced
121 Profiling is active when the context manager is active. When the context |
121 Profiling is active when the context manager is active. When the context |
122 manager exits, profiling results will be written to the configured output. |
122 manager exits, profiling results will be written to the configured output. |
123 """ |
123 """ |
124 profiler = os.getenv('HGPROF') |
124 profiler = os.getenv('HGPROF') |
125 if profiler is None: |
125 if profiler is None: |
126 profiler = ui.config('profiling', 'type', default='ls') |
126 profiler = ui.config('profiling', 'type', default='stat') |
127 if profiler not in ('ls', 'stat', 'flame'): |
127 if profiler not in ('ls', 'stat', 'flame'): |
128 ui.warn(_("unrecognized profiler '%s' - ignored\n") % profiler) |
128 ui.warn(_("unrecognized profiler '%s' - ignored\n") % profiler) |
129 profiler = 'ls' |
129 profiler = 'stat' |
130 |
130 |
131 output = ui.config('profiling', 'output') |
131 output = ui.config('profiling', 'output') |
132 |
132 |
133 if output == 'blackbox': |
133 if output == 'blackbox': |
134 fp = util.stringio() |
134 fp = util.stringio() |