patch: more sftp unit tests
Robey Pointer
robey at lag.net
Mon Jan 9 06:14:56 GMT 2006
Apologies for the incredibly late reply.
On 19 Dec 2005, at 23:04, Robert Collins wrote:
> On Mon, 2005-12-19 at 21:04 -0800, Robey Pointer wrote:
>>
>> I wrote a little script to generate HTML files out of lsprof output,
>> so I can click around in the output and "follow the slow". Since
>> others may find it useful too, it's attached. To make it work you
>> also need a small patch to bzr, to make it generate pickled lsprof
>> files instead of dumping text. Also attached.
>
>
> Interesting. +1 on the patch if altered to still pprint the output for
> casual users.
Attached is a patch against bzr.dev to add option "--lsprof-file" for
specifying a file to dump lsprof pickle data, when running in lsprof
mode. By default, the old behavior (pretty-print to console) is
preserved.
This is not something needed for 0.7 IMHO, but useful for people
doing profiling.
> As for the put_controlfiles thing it looks like nearly half that
> second
> is taken up by 'open exclusive' and 'rename' operations: which on a
> local connection with encryption established seems remarkably long.
>
> bzrlib.transport.sftp:789(_sftp_open_exclusive) 9 0 226.2940 4.3180
> <.../paramiko/sftp_client.py>:229(rename) 18 0 399.9710 0.3690
>
> This seems to be the primary culprit there:
>
> <.../paramiko/packet.py>:207(write_all) 54 0 522.3890 522.3890
> 54 calls for 522 ms: 10ms per call - slow.
Yeah, and packet::write_all is really just a thin wrapper around
socket::send. It should only be writing across a loopback socket, so
that's very... odd. Maybe it's just my iBook being slow. :(
robey
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: lsprof-patch.txt
Url: https://lists.ubuntu.com/archives/bazaar/attachments/20060108/dbe34d18/attachment.txt
More information about the bazaar
mailing list