/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: Martin Pool
  • Date: 2007-10-03 08:06:44 UTC
  • mto: This revision was merged to the branch mainline in revision 2901.
  • Revision ID: mbp@sourcefrog.net-20071003080644-oivy0gkg98sex0ed
Avoid internal error tracebacks on failure to lock on readonly transport (#129701).

Add new LockFailed, which doesn't imply that we failed to get it because of
contention.  Raise this if we fail to create the pending or lock directories
because of Transport errors.

UnlockableTransport is not an internal error.

ReadOnlyLockError has a message which didn't match its name or usage; it's now
deprecated and callers are updated to use LockFailed which is more appropriate.

Add zero_ninetytwo deprecation symbol.

Unify assertMatchesRe with TestCase.assertContainsRe.

When the constructor is deprecated, just say that the class is deprecated, not
the __init__ method - this works better with applyDeprecated in tests.

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,