performance-history patch

Robert Collins robertc at robertcollins.net
Tue Aug 15 22:12:41 BST 2006


On Wed, 2006-08-16 at 00:02 +1000, Martin Pool wrote:
> Jan's patch to record performance history to a file got some +1s before
> with comments, so I'm going to review it and send it in.
> 
> I did have one change, which is 
> 
> === modified file 'bzrlib/tests/__init__.py'
> --- bzrlib/tests/__init__.py	2006-08-15 12:39:42 +0000
> +++ bzrlib/tests/__init__.py	2006-08-15 13:41:41 +0000
> @@ -142,9 +142,9 @@
>          unittest._TextTestResult.__init__(self, stream, descriptions, verbosity)
>          self.pb = pb
>          if bench_history is not None:
> -            #XXX is there a simpler way to get the revison id?
> -            branch = bzrlib.branch.Branch.open_containing('.')[0]
> -            revision_id = RevisionSpec(branch.revno()).in_history(branch).rev_id
> +            # XXX: If there's no branch, what should we do?
> +            branch = bzrlib.branch.Branch.open_containing(__file__)[0]
> +            revision_id = branch.last_revision()
>              bench_history.write("--date %s %s\n" % (time.time(), revision_id))
>          self._bench_history = bench_history

Oh! For PQM I'd like the file being recorded and the revision id
location to be completely decoupled. I guess we can add a another
parameter later though. 

So IF there is time, I'd like to be able to satisfy the use case:
 * User has an existing performance log in a /home/me/file
 * User branches bzr.dev into /tmp/bzr.dev
 * User cds to /tmp/bzr.dev
 * User runs ./bzr selftest --benchmark performance suite
using /home/me/file as the output log.

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/20060816/8b1033ce/attachment.pgp 


More information about the bazaar mailing list