Rev 4462: Fix failing benchmarks for dirstate helpers. in file:///home/vila/src/bzr/bugs/385453-make-pyrex/
Vincent Ladeuil
v.ladeuil+lp at free.fr
Mon Jun 22 16:39:42 BST 2009
At file:///home/vila/src/bzr/bugs/385453-make-pyrex/
------------------------------------------------------------
revno: 4462
revision-id: v.ladeuil+lp at free.fr-20090622153942-aorq8hfs6en444fx
parent: v.ladeuil+lp at free.fr-20090622143248-pe4av866hxgzn60e
committer: Vincent Ladeuil <v.ladeuil+lp at free.fr>
branch nick: cleanup
timestamp: Mon 2009-06-22 17:39:42 +0200
message:
Fix failing benchmarks for dirstate helpers.
-------------- next part --------------
=== modified file 'bzrlib/benchmarks/bench_dirstate.py'
--- a/bzrlib/benchmarks/bench_dirstate.py 2009-06-22 14:32:48 +0000
+++ b/bzrlib/benchmarks/bench_dirstate.py 2009-06-22 15:39:42 +0000
@@ -194,18 +194,18 @@
state.unlock()
def test__read_dirblocks_20k_tree_0_parents_py(self):
- from bzrlib._dirstate_helpers_py import _read_dirblocks_py
+ from bzrlib._dirstate_helpers_py import _read_dirblocks
state = self.build_20k_dirstate()
state.lock_read()
try:
self.assertEqual(dirstate.DirState.NOT_IN_MEMORY,
state._dirblock_state)
state._read_header_if_needed()
- self.time(_read_dirblocks_py, state)
+ self.time(_read_dirblocks, state)
finally:
state.unlock()
- def test__read_dirblocks_20k_tree_0_parents_c(self):
+ def test__read_dirblocks_20k_tree_0_parents_pyx(self):
self.requireFeature(CompiledDirstateHelpersFeature)
from bzrlib._dirstate_helpers_pyx import _read_dirblocks
state = self.build_20k_dirstate()
@@ -230,7 +230,7 @@
finally:
state.unlock()
- def test__read_dirblocks_20k_tree_1_parent_c(self):
+ def test__read_dirblocks_20k_tree_1_parent_pyx(self):
self.requireFeature(CompiledDirstateHelpersFeature)
from bzrlib._dirstate_helpers_pyx import _read_dirblocks
state = self.build_20k_dirstate_with_parents(1)
@@ -255,7 +255,7 @@
finally:
state.unlock()
- def test__read_dirblocks_20k_tree_2_parents_c(self):
+ def test__read_dirblocks_20k_tree_2_parents_pyx(self):
self.requireFeature(CompiledDirstateHelpersFeature)
from bzrlib._dirstate_helpers_pyx import _read_dirblocks
state = self.build_20k_dirstate_with_parents(2)
@@ -313,37 +313,37 @@
self.assertEqualDiff(expected_str, offset_str)
def test_bisect_dirblock_py(self):
- from bzrlib._dirstate_helpers_py import bisect_dirblock_py
+ from bzrlib._dirstate_helpers_py import bisect_dirblock
state = self.build_10k_dirstate_dirs()
state.lock_read()
try:
self.setup_paths_and_offsets(state)
offsets = self.time(self.do_bisect_list,
- bisect_dirblock_py)
+ bisect_dirblock)
self.checkOffsets(offsets)
finally:
state.unlock()
def test_bisect_dirblock_cached_py(self):
- from bzrlib._dirstate_helpers_py import bisect_dirblock_py
+ from bzrlib._dirstate_helpers_py import bisect_dirblock
state = self.build_10k_dirstate_dirs()
state.lock_read()
try:
self.setup_paths_and_offsets(state)
offsets = self.time(self.do_bisect_list_cached,
- bisect_dirblock_py)
+ bisect_dirblock)
self.checkOffsets(offsets)
finally:
state.unlock()
- def test_bisect_dirblock_c(self):
+ def test_bisect_dirblock_pyx(self):
self.requireFeature(CompiledDirstateHelpersFeature)
- from bzrlib._dirstate_helpers_pyx import bisect_dirblock_c
+ from bzrlib._dirstate_helpers_pyx import bisect_dirblock
state = self.build_10k_dirstate_dirs()
state.lock_read()
try:
self.setup_paths_and_offsets(state)
- offsets = self.time(self.do_bisect_list, bisect_dirblock_c)
+ offsets = self.time(self.do_bisect_list, bisect_dirblock)
self.checkOffsets(offsets)
finally:
state.unlock()
@@ -415,12 +415,12 @@
def test_cmp_by_dirs_py(self):
"""Benchmark 103041 comparisons."""
- from bzrlib._dirstate_helpers_py import cmp_by_dirs_py
- self.compareAllPaths(cmp_by_dirs_py,
+ from bzrlib._dirstate_helpers_py import cmp_by_dirs
+ self.compareAllPaths(cmp_by_dirs,
[(3, 1), (3, 1), (3, 1), (3, 2)])
def test_cmp_by_dirs_pyrex(self):
self.requireFeature(CompiledDirstateHelpersFeature)
- from bzrlib._dirstate_helpers_pyx import cmp_by_dirs_c
- self.compareAllPaths(cmp_by_dirs_c,
+ from bzrlib._dirstate_helpers_pyx import cmp_by_dirs
+ self.compareAllPaths(cmp_by_dirs,
[(3, 1), (3, 1), (3, 1), (3, 2)])
=== modified file 'bzrlib/tests/test__dirstate_helpers.py'
--- a/bzrlib/tests/test__dirstate_helpers.py 2009-06-22 14:32:48 +0000
+++ b/bzrlib/tests/test__dirstate_helpers.py 2009-06-22 15:39:42 +0000
@@ -246,7 +246,7 @@
class TestBisectPathLeft(tests.TestCase, TestBisectPathMixin):
- """Run all Bisect Path tests against _bisect_path_left_py."""
+ """Run all Bisect Path tests against _bisect_path_left."""
def get_bisect_path(self):
from bzrlib._dirstate_helpers_py import _bisect_path_left
@@ -257,7 +257,7 @@
class TestCompiledBisectPathLeft(TestBisectPathLeft):
- """Run all Bisect Path tests against _bisect_path_right_c"""
+ """Run all Bisect Path tests against _bisect_path_lect"""
_test_needs_features = [CompiledDirstateHelpersFeature]
@@ -267,7 +267,7 @@
class TestBisectPathRight(tests.TestCase, TestBisectPathMixin):
- """Run all Bisect Path tests against _bisect_path_right_py"""
+ """Run all Bisect Path tests against _bisect_path_right"""
def get_bisect_path(self):
from bzrlib._dirstate_helpers_py import _bisect_path_right
@@ -278,7 +278,7 @@
class TestCompiledBisectPathRight(TestBisectPathRight):
- """Run all Bisect Path tests against _bisect_path_right_c"""
+ """Run all Bisect Path tests against _bisect_path_right"""
_test_needs_features = [CompiledDirstateHelpersFeature]
More information about the bazaar-commits
mailing list