~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_repository.py

  • Committer: John Arbash Meinel
  • Date: 2010-08-04 04:33:24 UTC
  • mto: This revision was merged to the branch mainline in revision 5390.
  • Revision ID: john@arbash-meinel.com-20100804043324-1ldc2v2w1kza7ox4
get into the nitty gritty for the _key_to_sha1 function.

It doesn't seem to help to op-out of the actual unhexlify call, so at least
that doesn't seem to be the performance overhead.
We get down to around 19.9us for _key_to_sha1 across 120 keys, which is
0.166us per key.

Show diffs side-by-side

added added

removed removed

Lines of Context:
23
23
"""
24
24
 
25
25
from stat import S_ISDIR
26
 
from StringIO import StringIO
27
26
import sys
28
27
 
29
28
import bzrlib
30
 
from bzrlib.errors import (NotBranchError,
31
 
                           NoSuchFile,
 
29
from bzrlib.errors import (NoSuchFile,
32
30
                           UnknownFormatError,
33
31
                           UnsupportedFormatError,
34
32
                           )
36
34
    graph,
37
35
    tests,
38
36
    )
39
 
from bzrlib.branchbuilder import BranchBuilder
40
37
from bzrlib.btree_index import BTreeBuilder, BTreeGraphIndex
41
 
from bzrlib.index import GraphIndex, InMemoryGraphIndex
 
38
from bzrlib.index import GraphIndex
42
39
from bzrlib.repository import RepositoryFormat
43
 
from bzrlib.smart import server
44
40
from bzrlib.tests import (
45
41
    TestCase,
46
42
    TestCaseWithTransport,
47
 
    TestSkipped,
48
 
    test_knit,
49
43
    )
50
44
from bzrlib.transport import (
51
 
    fakenfs,
52
45
    get_transport,
53
46
    )
54
47
from bzrlib import (
55
 
    bencode,
56
48
    bzrdir,
57
49
    errors,
58
50
    inventory,
59
51
    osutils,
60
 
    progress,
61
52
    repository,
62
53
    revision as _mod_revision,
63
 
    symbol_versioning,
64
54
    upgrade,
65
55
    versionedfile,
66
56
    workingtree,