/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_bench.py

  • Committer: Robert Collins
  • Date: 2010-05-11 08:44:59 UTC
  • mfrom: (5221 +trunk)
  • mto: This revision was merged to the branch mainline in revision 5223.
  • Revision ID: robertc@robertcollins.net-20100511084459-pb0uinna9zs3wu59
Merge trunk - resolve conflicts.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 by Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
 
# it under the terms of the GNU General Public License version 2 as published by
5
 
# the Free Software Foundation.
 
4
# it under the terms of the GNU General Public License as published by
 
5
# the Free Software Foundation; either version 2 of the License, or
 
6
# (at your option) any later version.
6
7
#
7
8
# This program is distributed in the hope that it will be useful,
8
9
# but WITHOUT ANY WARRANTY; without even the implied warranty of
11
12
#
12
13
# You should have received a copy of the GNU General Public License
13
14
# along with this program; if not, write to the Free Software
14
 
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
15
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
15
16
 
16
17
"""Tests for bzr benchmark utilities performance."""
17
18
 
28
29
 
29
30
 
30
31
class MakeKernelLikeTreeBenchmark(Benchmark):
 
32
    """Benchmark creating benchmark trees."""
31
33
 
32
34
    def test_make_kernel_like_tree(self):
33
 
        """Making a kernel sized tree should be ~ 5seconds on modern disk.""" 
 
35
        """Making a kernel sized tree should be ~ 5seconds on modern disk."""
34
36
        # on roberts machine: this originally took:  7372ms/ 7479ms
35
37
        # with the LocalTransport._abspath call:     3730ms/ 3778ms
36
38
        # with AtomicFile tuning:                    2888ms/ 2926ms
53
55
        self.time(creator.create, root='foo')
54
56
 
55
57
    def test_04_make_kernel_like_added_tree(self):
56
 
        """Time the second creation of a kernel like added tree 
 
58
        """Time the second creation of a kernel like added tree
57
59
        (this should be a clone)
58
60
        """
59
61
        # make sure kernel_like_added_tree is cached
71
73
        self.time(creator.create, root='foo')
72
74
 
73
75
    def test_06_make_kernel_like_committed_tree(self):
74
 
        """Time the second creation of a committed kernel like tree 
 
76
        """Time the second creation of a committed kernel like tree
75
77
        (this should be a clone)
76
78
        """
77
79
        creator = KernelLikeCommittedTreeCreator(self,
84
86
        self.time(creator.create, root='bar')
85
87
 
86
88
    def test_07_make_kernel_like_committed_tree_hardlink(self):
87
 
        """Time the creation of a committed kernel like tree 
 
89
        """Time the creation of a committed kernel like tree
88
90
        (this should also hardlink the .bzr/ directory)
89
91
        """
90
92
        creator = KernelLikeCommittedTreeCreator(self,