Show More
@@ -188,26 +188,27 b' class profile(object):' | |||||
188 |
|
188 | |||
189 | self._output = self._ui.config('profiling', 'output') |
|
189 | self._output = self._ui.config('profiling', 'output') | |
190 |
|
190 | |||
191 | if self._output == 'blackbox': |
|
191 | if True: | |
192 |
self._ |
|
192 | if self._output == 'blackbox': | |
193 | elif self._output: |
|
193 | self._fp = util.stringio() | |
194 |
|
|
194 | elif self._output: | |
195 | self._fp = open(path, 'wb') |
|
195 | path = self._ui.expandpath(self._output) | |
196 | else: |
|
196 | self._fp = open(path, 'wb') | |
197 |
|
|
197 | else: | |
198 |
self._fp = |
|
198 | self._fpdoclose = False | |
|
199 | self._fp = self._ui.ferr | |||
199 |
|
200 | |||
200 | if proffn is not None: |
|
201 | if proffn is not None: | |
201 | pass |
|
202 | pass | |
202 | elif profiler == 'ls': |
|
203 | elif profiler == 'ls': | |
203 | proffn = lsprofile |
|
204 | proffn = lsprofile | |
204 | elif profiler == 'flame': |
|
205 | elif profiler == 'flame': | |
205 | proffn = flameprofile |
|
206 | proffn = flameprofile | |
206 | else: |
|
207 | else: | |
207 | proffn = statprofile |
|
208 | proffn = statprofile | |
208 |
|
209 | |||
209 | self._profiler = proffn(self._ui, self._fp) |
|
210 | self._profiler = proffn(self._ui, self._fp) | |
210 | self._profiler.__enter__() |
|
211 | self._profiler.__enter__() | |
211 |
|
212 | |||
212 | def __exit__(self, exception_type, exception_value, traceback): |
|
213 | def __exit__(self, exception_type, exception_value, traceback): | |
213 | if self._profiler is None: |
|
214 | if self._profiler is None: |
General Comments 0
You need to be logged in to leave comments.
Login now