/brz/remove-bazaar

To get this branch, use:
bzr branch http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_commit.py

  • Committer: John Arbash Meinel
  • Date: 2006-08-16 19:22:00 UTC
  • mto: This revision was merged to the branch mainline in revision 1937.
  • Revision ID: john@arbash-meinel.com-20060816192200-776f33f7a5dc5820
Clean up commit benchmarks now that caching is not always available

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
 
27
27
    def test_commit_kernel_like_tree(self):
28
28
        """Commit of a fresh import of a clean kernel sized tree."""
29
 
        # uncomment this to run the benchmark with the repository in memory
30
 
        # not disk
31
 
        # self.transport_server = MemoryServer
32
 
        # self.make_kernel_like_tree(self.get_url())
33
29
        tree = self.make_kernel_like_added_tree()
34
 
        # on robertc's machine the first sample of this took 59750ms/77682ms
35
 
        # after initial call reduction                       53922ms/73918ms
36
30
        self.time(self.run_bzr, 'commit', '-m', 'first post')
37
31
 
38
32
    def test_partial_commit_kernel_like_tree(self):
45
39
        tree = self.make_kernel_like_committed_tree()
46
40
        self.time(self.run_bzr, 'commit', '-m', 'no changes', '--unchanged')
47
41
 
48
 
    def test_commit_one_in_kernel_like_tree_cold_hash_cache(self):
49
 
        """Time committing a single change, when not directly specified"""
50
 
        tree = self.make_kernel_like_committed_tree(hot_cache=False)
51
 
 
52
 
        # working-tree is hardlinked, so replace a file and commit the change
53
 
        os.remove('4/4/4/4')
54
 
        open('4/4/4/4', 'wb').write('new contents\n')
55
 
        self.time(self.run_bzr, 'commit', '-m', 'second')
56
 
 
57
 
    def test_commit_one_in_kernel_like_tree_hot_hash_cache(self):
 
42
    def test_commit_one_in_kernel_like_tree(self):
58
43
        """Time committing a single change, when not directly specified"""
59
44
        tree = self.make_kernel_like_committed_tree()
60
45
 
63
48
        open('4/4/4/4', 'wb').write('new contents\n')
64
49
        self.time(self.run_bzr, 'commit', '-m', 'second')
65
50
 
66
 
    def test_partial_commit_one_in_kernel_like_tree_cold_hash_cache(self):
67
 
        """Time committing a single change when it is directly specified"""
68
 
 
69
 
        tree = self.make_kernel_like_committed_tree(hot_cache=False)
70
 
 
71
 
        # working-tree is hardlinked, so replace a file and commit the change
72
 
        os.remove('4/4/4/4')
73
 
        open('4/4/4/4', 'wb').write('new contents\n')
74
 
        self.time(self.run_bzr, 'commit', '-m', 'second', '4/4/4/4')
75
 
 
76
 
    def test_partial_commit_one_in_kernel_like_tree_hot_hash_cache(self):
77
 
        """Time committing a single change when it is directly specified"""
78
 
 
 
51
    def test_partial_commit_one_in_kernel_like_tree(self):
 
52
        """Time committing a single change when it is directly specified"""
79
53
        tree = self.make_kernel_like_committed_tree()
80
54
 
81
55
        # working-tree is hardlinked, so replace a file and commit the change