~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: 2007-10-24 12:49:17 UTC
  • mfrom: (2935.1.1 ianc-integration)
  • Revision ID: pqm@pqm.ubuntu.com-20071024124917-xb75eckyxx6vkrlg
Makefile fixes - hooks.html generation & allow python to be overridden (Ian Clatworthy)

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
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
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
37
 
        # switching to transport.append:             1468ms/ 2849ms
 
39
        # switching to transport.append_bytes:       1468ms/ 2849ms
38
40
        self.time(self.make_kernel_like_tree)
39
41
 
40
42
    def test_02_make_kernel_like_tree(self):