~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_commit.py

  • Committer: Robert Collins
  • Date: 2006-05-24 03:00:14 UTC
  • mto: (1755.1.2 integration)
  • mto: This revision was merged to the branch mainline in revision 1757.
  • Revision ID: robertc@robertcollins.net-20060524030014-0af2706006ed9f98
Bugfix create_branch_convenience at the root of a file system to not loop
infinitely. Teach Benchmark.make_kernel_like_Tree to support making a tree
in a ramdisk to remove external IO costs for the repository when desired.

Show diffs side-by-side

added added

removed removed

Lines of Context:
17
17
 
18
18
 
19
19
from bzrlib.benchmarks import Benchmark
 
20
from bzrlib.transport.memory import MemoryServer
 
21
from bzrlib.transport import get_transport
20
22
 
21
23
 
22
24
class CommitBenchmark(Benchmark):
23
25
 
24
26
    def test_commit_kernel_like_tree(self):
25
27
        """Commit of a fresh import of a clean kernel sized tree."""
26
 
        self.make_kernel_like_tree()
 
28
        # uncomment this to run the benchmark with the repository in memory
 
29
        # not disk
 
30
        # self.transport_server = MemoryServer
 
31
        self.make_kernel_like_tree(self.get_url())
27
32
        self.run_bzr('add')
28
33
        # on robertc's machine the first sample of this took 59750ms/77682ms
29
34
        # after initial call reduction                       53922ms/73918ms