Mon, 12 Jun 2017 17:24:10 +0200 profile: properly propagate exception from the sub-context manager
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:24:10 +0200] rev 32810
profile: properly propagate exception from the sub-context manager Context manager has a mechanism to control extension propagation. It is not used by profiling right now, but making the code correct will help prevent bug in the future.
Mon, 12 Jun 2017 17:25:37 +0200 profile: close 'fp' in all cases
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:25:37 +0200] rev 32809
profile: close 'fp' in all cases There are no way for this to happen today, but better be safe than sorry, no one know how the code will evolve. We now make sure the file pointer is closed even is profiler is None.
Mon, 12 Jun 2017 17:21:41 +0200 profile: close 'fp' on error within '__enter__'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:21:41 +0200] rev 32808
profile: close 'fp' on error within '__enter__' Previously, error when initialying the profiler would forgot to explicitly close the file. Thank goes to Yuya Nishihara for spotting this.
Mon, 12 Jun 2017 17:20:48 +0200 profile: indent part of '__enter__'
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:20:48 +0200] rev 32807
profile: indent part of '__enter__' We are about to introduce a try except. We start with adding the indent to make the next patch clearer.
Mon, 12 Jun 2017 17:15:43 +0200 profile: remove now useless indent
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:15:43 +0200] rev 32806
profile: remove now useless indent We no longer rely on the value of '_output' so we can remove this conditional.
Mon, 12 Jun 2017 17:14:56 +0200 profile: use explicit logic to control file closing
Pierre-Yves David <pierre-yves.david@octobus.net> [Mon, 12 Jun 2017 17:14:56 +0200] rev 32805
profile: use explicit logic to control file closing We make the decision to close 'fp' more explicit instead of relying on the implication of other variable. This makes the overall logic more robust.
(0) -30000 -10000 -3000 -1000 -300 -100 -30 -10 -6 +6 +10 +30 +100 +300 +1000 +3000 +10000 tip