[RFC/MERGE] 'bzr --lsprof' should print even with ^C
John Arbash Meinel
john at arbash-meinel.com
Wed Nov 29 16:37:53 GMT 2006
John Arbash Meinel wrote:
> When you run 'bzr --lsprof cmd' it generally prints out the profile
> timings when the command has finished. However if you ^C the command
> first, then you don't get anything.
>
> I have a use case where I'm doing a big import, and I want to have it
> just run for a little bit so I can tell what is taking so long, without
> having to wait hours for it to finish.
>
> The attached patch changes it so that if you supply --lsprof or
> --lsprof-file, it will always write the profiled timings out, even if
> there is an exception (like KeyboardInterrupt) raised.
>
> This also means you can get profiles for commands that fail.
>
> John
> =:->
>
Forget this patch. I was playing around with it some more, and the
problem is that I'm trying to get the return value from a function, but
an exception is propagating.
There are ways to fix it, but it will take quite a bit more work.
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 254 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20061129/3817ff76/attachment.pgp
More information about the bazaar
mailing list