~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/__init__.py

  • Committer: Jan Balster
  • Date: 2006-07-28 06:47:27 UTC
  • mto: This revision was merged to the branch mainline in revision 1928.
  • Revision ID: jan@merlinux.de-20060728064727-c42102e4a776b604
save the revison id for every benchmark run in .perf-history

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
import bzrlib.plugin
64
64
import bzrlib.progress as progress
65
65
from bzrlib.revision import common_ancestor
 
66
from bzrlib.revisionspec import RevisionSpec
66
67
import bzrlib.store
67
68
import bzrlib.trace
68
69
from bzrlib.transport import get_transport
137
138
        unittest._TextTestResult.__init__(self, stream, descriptions, verbosity)
138
139
        self.pb = pb
139
140
        if bench_history is not None:
140
 
            bench_history.write("--date %s\n" % time.time())
 
141
            #XXX is there a simpler way to get the revison id?
 
142
            branch = bzrlib.branch.Branch.open_containing('.')[0]
 
143
            revision_id = RevisionSpec(branch.revno()).in_history(branch).rev_id
 
144
            bench_history.write("--date %s %s\n" % (time.time(), revision_id))
141
145
        self._bench_history = bench_history
142
146
    
143
147
    def extractBenchmarkTime(self, testCase):