/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: 2007-07-15 15:40:37 UTC
  • mto: (2592.3.33 repository)
  • mto: This revision was merged to the branch mainline in revision 2624.
  • Revision ID: robertc@robertcollins.net-20070715154037-3ar8g89decddc9su
Make GraphIndex accept nodes as key, value, references, so that the method
signature is closer to what a simple key->value index delivers. Also
change the behaviour when the reference list count is zero to accept
key, value as nodes, and emit key, value to make it identical in that case
to a simple key->value index. This may not be a good idea, but for now it
seems ok.

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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
 
15
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
16
16
 
17
17
"""Tests for bzr benchmark utilities performance."""
18
18
 
32
32
    """Benchmark creating benchmark trees."""
33
33
 
34
34
    def test_make_kernel_like_tree(self):
35
 
        """Making a kernel sized tree should be ~ 5seconds on modern disk."""
 
35
        """Making a kernel sized tree should be ~ 5seconds on modern disk.""" 
36
36
        # on roberts machine: this originally took:  7372ms/ 7479ms
37
37
        # with the LocalTransport._abspath call:     3730ms/ 3778ms
38
38
        # with AtomicFile tuning:                    2888ms/ 2926ms
55
55
        self.time(creator.create, root='foo')
56
56
 
57
57
    def test_04_make_kernel_like_added_tree(self):
58
 
        """Time the second creation of a kernel like added tree
 
58
        """Time the second creation of a kernel like added tree 
59
59
        (this should be a clone)
60
60
        """
61
61
        # make sure kernel_like_added_tree is cached
73
73
        self.time(creator.create, root='foo')
74
74
 
75
75
    def test_06_make_kernel_like_committed_tree(self):
76
 
        """Time the second creation of a committed kernel like tree
 
76
        """Time the second creation of a committed kernel like tree 
77
77
        (this should be a clone)
78
78
        """
79
79
        creator = KernelLikeCommittedTreeCreator(self,
86
86
        self.time(creator.create, root='bar')
87
87
 
88
88
    def test_07_make_kernel_like_committed_tree_hardlink(self):
89
 
        """Time the creation of a committed kernel like tree
 
89
        """Time the creation of a committed kernel like tree 
90
90
        (this should also hardlink the .bzr/ directory)
91
91
        """
92
92
        creator = KernelLikeCommittedTreeCreator(self,