patch: more sftp unit tests
John Arbash Meinel
john at arbash-meinel.com
Tue Jan 10 14:26:03 GMT 2006
Robey Pointer wrote:
> 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
>
I don't have lsprof installed, so I can't really test this and give it a
rating. But I don't want it to get lost either. Can somebody else give a
review?
John
=:->
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 256 bytes
Desc: OpenPGP digital signature
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060110/f21e712f/attachment.pgp
More information about the bazaar
mailing list