Debugging import times

Martin Pool mbp at canonical.com
Tue May 23 08:46:54 BST 2006


On 22 May 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> I thought this snippet of code might be useful for other people. It's
> basically just an import hook which tracks what is being imported, for
> who, and how long it is taking.
> 
> It adds the flag '--profile-imports' as a global option. But to make it
> truly useful, it is parsed in 'bzr' itself, before anything else is
> imported. (I suppose it could be delayed until after it determines that
> it is running python2.4
> 
> I don't know if we want to add it to regular bzr or not, but it is a
> handy knob for what I'm doing.

+0.5 - feel free to merge it to bzr.dev if you think it's useful to have
it generally available.


-- 
Martin Pool




More information about the bazaar mailing list