~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/benchmarks/bench_bench.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2009-04-09 20:23:07 UTC
  • mfrom: (4265.1.4 bbc-merge)
  • Revision ID: pqm@pqm.ubuntu.com-20090409202307-n0depb16qepoe21o
(jam) Change _fetch_uses_deltas = False for CHK repos until we can
        write a better fix.

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#
13
13
# You should have received a copy of the GNU General Public License
14
14
# along with this program; if not, write to the Free Software
15
 
# 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
16
16
 
17
17
"""Tests for bzr benchmark utilities performance."""
18
18
 
29
29
 
30
30
 
31
31
class MakeKernelLikeTreeBenchmark(Benchmark):
 
32
    """Benchmark creating benchmark trees."""
32
33
 
33
34
    def test_make_kernel_like_tree(self):
34
 
        """Making a kernel sized tree should be ~ 5seconds on modern disk.""" 
 
35
        """Making a kernel sized tree should be ~ 5seconds on modern disk."""
35
36
        # on roberts machine: this originally took:  7372ms/ 7479ms
36
37
        # with the LocalTransport._abspath call:     3730ms/ 3778ms
37
38
        # with AtomicFile tuning:                    2888ms/ 2926ms
54
55
        self.time(creator.create, root='foo')
55
56
 
56
57
    def test_04_make_kernel_like_added_tree(self):
57
 
        """Time the second creation of a kernel like added tree 
 
58
        """Time the second creation of a kernel like added tree
58
59
        (this should be a clone)
59
60
        """
60
61
        # make sure kernel_like_added_tree is cached
72
73
        self.time(creator.create, root='foo')
73
74
 
74
75
    def test_06_make_kernel_like_committed_tree(self):
75
 
        """Time the second creation of a committed kernel like tree 
 
76
        """Time the second creation of a committed kernel like tree
76
77
        (this should be a clone)
77
78
        """
78
79
        creator = KernelLikeCommittedTreeCreator(self,
85
86
        self.time(creator.create, root='bar')
86
87
 
87
88
    def test_07_make_kernel_like_committed_tree_hardlink(self):
88
 
        """Time the creation of a committed kernel like tree 
 
89
        """Time the creation of a committed kernel like tree
89
90
        (this should also hardlink the .bzr/ directory)
90
91
        """
91
92
        creator = KernelLikeCommittedTreeCreator(self,