~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_commit.py

Merge Jan's benchmarks.

Show diffs side-by-side

added added

removed removed

Lines of Context:
34
34
        # on robertc's machine the first sample of this took 59750ms/77682ms
35
35
        # after initial call reduction                       53922ms/73918ms
36
36
        self.time(self.run_bzr, 'commit', '-m', 'first post')
 
37
 
 
38
    def test_commit_single_file_in_kernel_like_tree(self):
 
39
        """Commit of a new singel file to a kernel sized tree."""
 
40
        # uncomment this to run the benchmark with the repository in memory
 
41
        # not disk
 
42
        # self.transport_server = MemoryServer
 
43
        # self.make_kernel_like_tree(self.get_url())
 
44
        self.make_kernel_like_tree()
 
45
        self.run_bzr('add')
 
46
        self.run_bzr('commit', '-m', 'first post')
 
47
        filename = 'unique_file_name'
 
48
        self.build_tree([filename])
 
49
        self.run_bzr('add', filename)
 
50
        self.time(self.run_bzr, 'commit', '-m', 'added singel file',
 
51
                  filename)
 
52
        
 
53