[merge][rfc] log+ transport decorator

Martin Pool mbp at sourcefrog.net
Wed Oct 17 06:42:56 BST 2007


This lets you say

  bzr push log+sftp://blah

and it will write to .bzr.log a record of the calls that were made,
the results, and how long they took.  A bit like strace (but for
Bazaar transport io) and a bit like -Dhpss.

It's perhaps a bit strange that this is turned on through a url prefix
and the other one through a global debug option, but not too strange,
and it's easier this way.

This is a bit duplicative of the trace+ decorator Robert added a while
ago for testing.  I think it's good to distinguish "capture things so
tests can look at them" from "so  humans can look at them" and when
they're combined it tends to make the tests fragile.  But there could
be a little implementation in common.

This also somewhat duplicates Vincent's transportstats plugin, but it
looks like that's meant more for machine analysis than display in real
time.  I'd like to update the hacking file to mention all three
options.

There aren't many tests for the actual tracing; the general transport
tests should make sure that it doesn't break the underlying transport.

I'm not going to merge this yet but thought I'd post the patch.

-- 
Martin
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 20071017-transport-logging.diff
Type: text/x-diff
Size: 12148 bytes
Desc: not available
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20071017/59e9f7b7/attachment-0001.bin 


More information about the bazaar mailing list