[merge] commit benchmarks, small tweak to tuned_gzip.py

Robert Collins robertc at robertcollins.net
Thu Aug 17 01:31:12 BST 2006


On Wed, 2006-08-16 at 14:26 -0500, John Arbash Meinel wrote:
> 
>  
>      def test_commit_kernel_like_tree(self):
>          """Commit of a fresh import of a clean kernel sized tree."""
> -        # uncomment this to run the benchmark with the repository in
> memory
> -        # not disk
> -        # self.transport_server = MemoryServer
> -        # self.make_kernel_like_tree(self.get_url()) 

I'd like to keep this available please - its very useful for separating
out local disk io vs repository io overheads.

> -        if sizehint <= 0:
> -            sizehint = -1
> -        content = self.read(sizehint)
> -        return bzrlib.osutils.split_lines(content)
> +        content = StringIO(self.read(-1))
> +        return content.readlines()

Here, can you preserve the sizehint honouring interface - just comment
it out, with a comment like
# python's gzip routine uses sizehint. This is a more efficient way than
# python uses to honour it, but we dont need it at all.

This will help when we send this upstream to python.


+1 to the rest.

Cheers,
Rob
-- 
GPG key available at: <http://www.robertcollins.net/keys.txt>.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 191 bytes
Desc: This is a digitally signed message part
Url : https://lists.ubuntu.com/archives/bazaar/attachments/20060817/57b7b4de/attachment.pgp 


More information about the bazaar mailing list