[BUG][0.12] bench_bundle imports the wrong 'read_bundle'
Martin Pool
mbp at canonical.com
Wed Oct 25 03:57:29 BST 2006
On 24 Oct 2006, John Arbash Meinel <john at arbash-meinel.com> wrote:
> The bench_bundle tests that were recently added are importing the wrong
> 'read_bundle' function. So when I updated bzr to lazily import the
> function, it now is grabbing the lazy object.
>
> The attached patch gets the benchmark tests running again. And changes
> the imports to import as private functions to help avoid this problem in
> the future.
>
> Some of them are slow enough we should probably be skipping them. I
> thought we weren't running the 1000 revision tests, but it seems those
> did get merged. Martin was just running the tests, and 1 of them was
> taking 149653319ms or ~41 hours to complete a single test on our
> benchmark machine. Which is not really what we want to be testing. A
> couple minutes is a good time, an hour is reasonable, but beyond that
> isn't a very usable test. Maybe it allows us to show just how much
> faster we can become, but it isn't something we want to run often.
+1, jinx.
> === modified file 'bzrlib/bundle/__init__.py'
> --- bzrlib/bundle/__init__.py 2006-10-16 01:25:46 +0000
> +++ bzrlib/bundle/__init__.py 2006-10-24 15:33:22 +0000
> @@ -20,8 +20,8 @@
> errors,
> urlutils,
> )
> -from bzrlib.bundle.serializer import read_bundle
> -from bzrlib.transport import get_transport
> +from bzrlib.bundle.serializer import read_bundle as _read_bundle
> +from bzrlib.transport import get_transport as _get_transport
> """)
I'm in favour of changing the imports to prevent the problem, but would
it be more consistent to just import serializer and say
serializer.read_bundle.
--
Martin
More information about the bazaar
mailing list