[MERGE] more benchmarks

Robert Collins robertc at robertcollins.net
Mon May 22 05:56:48 BST 2006


On Mon, 2006-05-22 at 14:00 +1000, Martin Pool wrote:
> On 22 May 2006, Robert Collins <robertc at robertcollins.net> wrote:
> > This adds benchmarks for 'bzr status' in a kernel like tree with added
> > files and no ignored files, and 'bzr checkout --lightweight' of a kernel
> > like tree.
> 
> +1, very welcome.
> 
> > === added file 'bzrlib/benchmarks/bench_checkout.py'
> > +"""Tests for bzr tree building (checkout) performance."""
> > +
> > +
> > +from bzrlib.benchmarks import Benchmark
> > +
> > +
> > +class Checkout(Benchmark):
> 
> How about a convention that benchmark classes are called e.g.
> 'BenchCheckout' or 'CheckoutBenchmark'?  (There seems some potential for
> confusion in having one just called Checkout in the namespace.)

Sure, I'm trying to find good names :). CheckoutBenchmark is better then
BenchCheckout for the class IMO. Checkout felt nicer, but .. I agree
there is room for confusion.

> > +
> > +    def test_build_kernel_like_tree(self):
> > +        """Checkout of a clean kernel sized tree should be (<10secs)."""
> > +        self.make_kernel_tree()
> > +        self.run_bzr('add')
> > +        self.run_bzr('commit', '-m', 'first post')
> > +        # on robertc's machine the first sample of this took 105079ms/205417ms
> > +        self.time(self.run_bzr, 'checkout', '--lightweight', '.', 'acheckout')
> > 
> > === added file 'bzrlib/benchmarks/bench_status.py'
> > --- /dev/null	
> > +++ bzrlib/benchmarks/bench_status.py	
> > +from bzrlib.benchmarks import Benchmark
> > +
> > +
> > +class Status(Benchmark):
> > +
> > +    def test_clean_kernel_like_tree(self):
> > +        """Status in a clean kernel sized tree should be bearable (<2secs) fast.""" 
> > +        self.make_kernel_tree()
> > +        self.run_bzr('add')
> > +        # on robertc's machine the first sample of this took 1687ms/15994ms
> > +        self.time(self.run_bzr, 'status')
> 
> Hm, depends what you mean by 'clean' - I would have expected that meant
> with no uncommitted changes. 

Fair enough. I meant 'no ignored or unknown files'. I'll clarify.

> > 

> Let's call it make_kernel_sized_tree or something, just for truth in
> advertising.

Well, we structured it on the kernel tree statistical data - its got
more in common with a kernel tree than just size. I'd rather not rename
it actually.

I've also added a Commit benchmark like the others.

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/20060522/b8b8c6b8/attachment.pgp 


More information about the bazaar mailing list