How to examine performance bottlenecks: profile data --version

Jari Aalto jari.aalto at cante.net
Sun Jan 20 23:07:09 GMT 2008


* Sun 2008-01-20 Jari Aalto <jari.aalto at cante.net>
>
> See this: (1.0.0 / Cygwin):
>
>     $ time bzr --version
>     real    0m16.830s
>     user    0m2.673s
>     sys     0m8.091s

Bazaar (bzr) 1.2.0.dev.0 (revno 3193)

2307.0  80.0  bzrlib                                    @ __main__:64
1161.0 195.0 +  [get_user_encoding]bzrlib.osutils       @ bzrlib:19
390.0  22.0 ++  [mutter]bzrlib.trace                    @ bzrlib.osutils:62
355.0  39.0 +++ logging                                 @ bzrlib.trace:54
115.0  61.0 ++++ string                                 @ logging:29
 54.0  54.0 +++++  [maketrans, lowercase, uppercase,    @ string:526
 91.0  47.0 ++++ threading                              @ logging:38
 44.0  44.0 +++++  [deque]collections                   @ threading:13
 32.0  32.0 ++++ traceback                              @ logging:29
 25.0  25.0 ++++ thread                                 @ logging:37
 24.0  24.0 ++++ atexit                                 @ logging:1363
  6.0   6.0 ++++ sys                                    @ logging:29
  5.0   5.0 ++++ time                                   @ logging:29
  5.0   5.0 ++++ os                                     @ logging:29
  5.0   5.0 ++++ cStringIO                              @ logging:29
  4.0   4.0 ++++ codecs                                 @ logging:32
  4.0   4.0 ++++ types                                  @ logging:29
 13.0  13.0 +++ codecs                                  @ bzrlib.trace:53
313.0  15.0 ++ [l]  [win32utils]bzrlib                  @ bzrlib.osutils:319
155.0  73.0 +++ ctypes                                  @ bzrlib.win32utils:56
 54.0  54.0 ++++  [Union, Structure, Array]_ctypes      @ ctypes:10
 12.0  12.0 ++++  [BigEndianStructure, LittleEndianS    @ ctypes:516
  7.0   7.0 ++++ os                                     @ ctypes:6
  5.0   5.0 ++++  [calcsize]struct                      @ ctypes:17
  4.0   4.0 ++++ sys                                    @ ctypes:6
 86.0  45.0 +++ struct                                  @ bzrlib.win32utils:23
 41.0  41.0 ++++  [Struct, error]_struct                @ struct:30
 57.0  57.0 +++ win32file                               @ bzrlib.win32utils:68
 98.0  35.0 ++ [l] sha                                  @ bzrlib.osutils:613
 63.0  21.0 +++  [sha1]hashlib                          @ sha:6
 42.0  42.0 ++++ _hashlib                               @ hashlib:102
 63.0  63.0 ++  [StringIO]cStringIO                     @ bzrlib.osutils:17
 29.0  17.0 ++  [symbol_versioning]bzrlib               @ bzrlib.osutils:57
 12.0  12.0 +++  [warn]warnings                         @ bzrlib.symbol_versioning:49
 16.0  16.0 ++  [lazy_import]bzrlib.lazy_import         @ bzrlib.osutils:26
 13.0  13.0 ++ stat                                     @ bzrlib.osutils:20
 13.0  13.0 ++ re                                       @ bzrlib.osutils:19
 12.0  12.0 ++ time                                     @ bzrlib.osutils:24
 10.0  10.0 ++ sys                                      @ bzrlib.osutils:23
  9.0   9.0 ++ os                                       @ bzrlib.osutils:18
893.0  27.0 + [l]  [config]bzrlib                       @ bzrlib.plugin:60
866.0 274.0 ++ [l]  [configobj]bzrlib.util.configo      @ bzrlib.config:125
473.0  22.0 +++ compiler                                @ bzrlib.util.configobj.configobj:29
239.0  25.0 ++++  [parse, parseFile]compiler.transfo    @ compiler:24
 81.0  75.0 +++++  [*]compiler.ast                      @ compiler.transformer:28
  6.0   6.0 ++++++  [CO_VARARGS, CO_VARKEYWORDS]compil  @ compiler.ast:5
 52.0  52.0 +++++ parser                                @ compiler.transformer:29
 48.0  48.0 +++++ token                                 @ compiler.transformer:31
 29.0  29.0 +++++ symbol                                @ compiler.transformer:30
  4.0   4.0 +++++ sys                                   @ compiler.transformer:32
205.0  25.0 ++++  [compile, compileFile]compiler.pyc    @ compiler:26
145.0  41.0 +++++  [pyassem, misc, future, symbols]co   @ compiler.pycodegen:9
 61.0  23.0 ++++++ dis                                  @ compiler.pyassem:3
 38.0  38.0 +++++++  [*]opcode                          @ dis:6
 31.0  30.0 ++++++ new                                  @ compiler.pyassem:4
  1.0   1.0 +++++++  [ModuleType]types                  @ new:11
  8.0   8.0 ++++++  [misc]compiler                      @ compiler.pyassem:7
  4.0   4.0 ++++++ types                                @ compiler.symbols:6
  9.0   9.0 +++++ os                                    @ compiler.pycodegen:2
  8.0   8.0 +++++  [ast, parse, walk, syntax]compiler   @ compiler.pycodegen:8
  5.0   5.0 +++++ imp                                   @ compiler.pycodegen:1
  4.0   4.0 +++++  [StringIO]cStringIO                  @ compiler.pycodegen:6
  4.0   4.0 +++++ struct                                @ compiler.pycodegen:4
  4.0   4.0 +++++ marshal                               @ compiler.pycodegen:3
  1.0   1.0 +++++ sys                                   @ compiler.pycodegen:5
  7.0   7.0 ++++  [walk]compiler.visitor                @ compiler:25
 47.0  47.0 +++  [VdtMissingValue]validate              @ bzrlib.util.configobj.configobj:92
 30.0  30.0 +++  [generators]__future__                 @ bzrlib.util.configobj.configobj:19
 12.0  12.0 +++ re                                      @ bzrlib.util.configobj.configobj:26
  6.0   6.0 +++  [warn]warnings                         @ bzrlib.util.configobj.configobj:34
  6.0   6.0 +++  [StringTypes]types                     @ bzrlib.util.configobj.configobj:33
  6.0   6.0 +++ sys                                     @ bzrlib.util.configobj.configobj:21
  6.0   6.0 +++  [BOM_UTF8, BOM_UTF16, BOM_UTF16_BE     @ bzrlib.util.configobj.configobj:36
  5.0   5.0 +++ os                                      @ bzrlib.util.configobj.configobj:26
  1.0   1.0 +++ sre_parse                               @ sre_compile:505
142.0  55.0 + locale                                    @ bzrlib.osutils:1354
 45.0  45.0 ++  [*]_locale                              @ locale:28
 42.0  42.0 ++ operator                                 @ locale:165
 19.0  19.0 + bzrlib.plugin                             @ bzrlib:50
 12.0  12.0 + [l]  [plugins]bzrlib                      @ bzrlib.plugin:107
1705.0  36.0   [RepositoryFormatKnit1]bzrlib.repo       @ bzrlib.registry:66
1496.0 112.0 +  [bzrdir, deprecated_graph, errors,      @ bzrlib.repofmt.knitrepo:25
659.0  83.0 ++  [cache_utf8, debug, diff, errors,       @ bzrlib.knit:82
301.0  48.0 +++  [TransformPreview, TreeTransform,      @ bzrlib.merge:51
251.0  41.0 ++++ tempfile                               @ bzrlib.transform:20
164.0  40.0 +++++  [Random]random                       @ tempfile:33
 44.0  44.0 ++++++ _random                              @ random:67
 41.0  41.0 ++++++  [log, exp, pi, e, ceil]math         @ random:43
 38.0  38.0 ++++++  [hexlify]binascii                   @ random:46
  1.0   1.0 ++++++  [warn]warnings                      @ random:41
 46.0  46.0 +++++ fcntl                                 @ tempfile:40
  2.0   2.0 ++++ os                                     @ bzrlib.transform:17
 99.0  37.0 +++ difflib                                 @ bzrlib.diff:17
 62.0  20.0 ++++ heapq                                  @ difflib:35
 42.0  42.0 +++++  [heappush, heappop, heapify, heapr   @ heapq:307
 79.0  79.0 +++ shutil                                  @ bzrlib.diff:20
 33.0  22.0 +++  [PlanWeaveMerge]bzrlib.versionedfi     @ bzrlib.merge:55
 11.0  11.0 ++++  [TextMerge]bzrlib.textmerge           @ bzrlib.versionedfile:39
 27.0  13.0 +++  [Merge3]bzrlib.merge3                  @ bzrlib.merge:45
 14.0  14.0 ++++  [check_text_lines]bzrlib.textfile     @ bzrlib.merge3:24
 18.0  18.0 +++  [unique_lcs_py, recurse_matches_py     @ bzrlib.patiencediff:133
  9.0   9.0 +++ errno                                   @ bzrlib.merge:19
  8.0   8.0 +++  [unique_lcs_c, recurse_matches_c,      @ bzrlib.patiencediff:127
  1.0   1.0 +++  [check_text_lines]bzrlib.textfile      @ bzrlib.merge:49
  1.0   1.0 +++ os                                      @ bzrlib.diff:18
412.0  23.0 ++  [SubElement, Element, Serializer]b      @ bzrlib.xml5:26
389.0 116.0 +++  [ElementTree, SubElement, Element,     @ bzrlib.xml_serializer:31
212.0  77.0 ++++  [*]_elementtree                       @ xml.etree.cElementTree:3
 69.0  18.0 +++++  [ElementTree]xml.etree               @ <unknown>:3
 27.0  26.0 ++++++ ElementPath                          @ xml.etree.ElementTree:136
  1.0   1.0 +++++++ re                                  @ xml.etree.ElementPath:54
 14.0  14.0 ++++++ re                                   @ xml.etree.ElementTree:112
  5.0   5.0 ++++++ string                               @ xml.etree.ElementTree:112
  5.0   5.0 ++++++ sys                                  @ xml.etree.ElementTree:112
 66.0  66.0 +++++  [__doc__]pyexpat                     @ profile_imports:137
 61.0  61.0 ++++ _xmlplus                               @ xml:32
156.0 126.0 ++ bzrlib.weave                             @ bzrlib.knit:113
 30.0  30.0 +++  [_read_weave_v5, write_weave_v5]bz     @ bzrlib.weave:93
 57.0  17.0 ++  [GzipFile, bytes_to_gzip]bzrlib.tu      @ bzrlib.knit:103
 38.0  35.0 +++ gzip                                    @ bzrlib.tuned_gzip:23
  2.0   2.0 ++++ zlib                                   @ gzip:9
  1.0   1.0 ++++ struct                                 @ gzip:8
  1.0   1.0 +++  [U32, LOWU32, FEXTRA, FCOMMENT, FN     @ bzrlib.tuned_gzip:24
  1.0   1.0 +++  [StringIO]cStringIO                    @ bzrlib.tuned_gzip:20
 54.0  54.0 ++  [Z_DEFAULT_COMPRESSION]zlib             @ bzrlib.knit:70
 15.0  15.0 ++  [_load_data_py]bzrlib._knit_load_d      @ bzrlib.knit:2694
 14.0  14.0 ++  [_load_data_c]bzrlib._knit_load_da      @ bzrlib.knit:2692
 11.0  11.0 ++ operator                                 @ bzrlib.knit:66
  5.0   5.0 ++  [BzrError]bzrlib.errors                 @ bzrlib.xml5:29
  1.0   1.0 ++  [FileExists, NoSuchFile, KnitError      @ bzrlib.knit:93
151.0  47.0 +  [VersionedFileStore]bzrlib.store.v       @ bzrlib.repofmt.knitrepo:49
 25.0  25.0 ++  [AtomicFile]bzrlib.atomicfile           @ bzrlib.store.versioned:34
 12.0  12.0 ++ errno                                    @ bzrlib.store.versioned:21
 12.0  12.0 ++ os                                       @ bzrlib.store:27
 10.0  10.0 ++  [errors, osutils]bzrlib                 @ bzrlib.store.versioned:27
  7.0   7.0 ++  [warn]warnings                          @ bzrlib.store.versioned:25
  6.0   6.0 ++ urllib                                   @ bzrlib.store.versioned:24
  6.0   6.0 ++  [StringIO]cStringIO                     @ bzrlib.store.versioned:23
  6.0   6.0 ++ urllib                                   @ bzrlib.store:29
  6.0   6.0 ++ bzrlib                                   @ bzrlib.store:32
  5.0   5.0 ++  [adler32]zlib                           @ bzrlib.store:30
  5.0   5.0 ++  [StringIO]cStringIO                     @ bzrlib.store:28
  4.0   4.0 ++ os                                       @ bzrlib.store.versioned:22
 17.0  11.0 +  [bencode]bzrlib.util                     @ bzrlib.repofmt.knitrepo:51
  6.0   6.0 ++  [StringType, IntType, LongType, Di      @ bzrlib.util.bencode:93
  5.0   5.0 +  [lazy_import]bzrlib.lazy_import          @ bzrlib.repofmt.knitrepo:17
899.0  21.0  bzrlib.commands                            @ __main__:96
878.0  23.0 +  [Option]bzrlib.option                    @ bzrlib.commands:56
683.0  60.0 ++ [l]  [log]bzrlib                         @ bzrlib.option:526
362.0 311.0 +++  [BzrCommandError]bzrlib.errors         @ bzrlib.log:68
 51.0  51.0 ++++  [MalformedHunkHeader, MalformedLin    @ bzrlib.errors:25
139.0  20.0 +++  [RevisionInfo]bzrlib.revisionspec      @ bzrlib.log:79
 68.0  29.0 ++++ bisect                                 @ bzrlib.revisionspec:18
 39.0  39.0 +++++  [bisect_right, bisect_left, insort   @ bisect:82
 51.0  51.0 ++++ datetime                               @ bzrlib.revisionspec:19
 68.0  15.0 +++  [NULL_REVISION]bzrlib.revision         @ bzrlib.log:76
 27.0  12.0 ++++  [all_descendants, Graph, node_dist    @ bzrlib.revision:25
 15.0  15.0 +++++  [topo_sort]bzrlib.tsort              @ bzrlib.deprecated_graph:18
 25.0  25.0 ++++  [DummyProgress]bzrlib.progress        @ bzrlib.revision:32
  1.0   1.0 ++++  [deprecated_function]bzrlib.symbol    @ bzrlib.revision:33
 53.0  53.0 +++  [izip]itertools                        @ bzrlib.log:53
  1.0   1.0 +++  [deprecated_method, zero_seventeen     @ bzrlib.log:82
158.0  90.0 ++ [l] optparse                             @ bzrlib.option:394
 41.0  41.0 +++  [gettext]gettext                       @ optparse:84
 27.0  27.0 +++ textwrap                                @ optparse:71
 14.0  14.0 ++ [l]  [registry]bzrlib                    @ bzrlib.option:437
780.0  97.0   [cmd_version]bzrlib.builtins              @ bzrlib.commands:728
475.0  64.0 + [l]  [bzrdir]bzrlib                       @ bzrlib.builtins:1290
245.0 146.0 ++  [LocalTransport]bzrlib.transport.l      @ bzrlib.bzrdir:79
 38.0  38.0 +++ [l] urlparse                            @ bzrlib.transport:164
 29.0  29.0 +++  [StringIO]cStringIO                    @ bzrlib.transport:29
  8.0   8.0 +++  [ST_MODE, S_ISDIR, ST_SIZE, S_IMOD     @ bzrlib.transport.local:23
  8.0   8.0 +++ re                                      @ bzrlib.transport:30
  6.0   6.0 +++  [lazy_import]bzrlib.lazy_import        @ bzrlib.transport:33
  6.0   6.0 +++ sys                                     @ bzrlib.transport:31
  4.0   4.0 +++ os                                      @ bzrlib.transport.local:22
111.0  21.0 ++ [l]  [lockable_files]bzrlib              @ bzrlib.bzrdir:1621
 51.0  51.0 +++ bzrlib.urlutils                         @ bzrlib.lockable_files:31
 39.0  20.0 +++ bzrlib.transactions                     @ bzrlib.lockable_files:30
 19.0  18.0 ++++  [IdentityMap, NullIdentityMap]bzrl    @ bzrlib.transactions:42
  1.0   1.0 +++++  [errors, osutils]bzrlib              @ bzrlib.identitymap:21
 55.0  25.0 ++ [l]  [lockdir]bzrlib                     @ bzrlib.bzrdir:1790
 30.0  13.0 +++  [read_stanza, Stanza]bzrlib.rio        @ bzrlib.lockdir:132
 17.0  17.0 ++++  [IterableFile]bzrlib.iterablefile     @ bzrlib.rio:35
 64.0  37.0 +  [cmd_bundle_info]bzrlib.bundle.com       @ bzrlib.builtins:4472
  9.0   9.0 ++  [StringIO]StringIO                      @ bzrlib.bundle:17
  9.0   9.0 ++ sys                                      @ bzrlib.bundle.commands:23
  5.0   5.0 ++  [lazy_import]bzrlib.lazy_import         @ bzrlib.bundle:19
  4.0   4.0 ++  [StringIO]cStringIO                     @ bzrlib.bundle.commands:24
 52.0  15.0 +  [cmd_version_info]bzrlib.cmd_versi       @ bzrlib.builtins:4470
 37.0  25.0 ++  [version_info_formats]bzrlib            @ bzrlib.cmd_version_info:27
  8.0   8.0 +++ time                                    @ bzrlib.version_info_formats:19
  4.0   4.0 +++  [local_time_offset, format_date]bz     @ bzrlib.version_info_formats:21
 33.0  33.0 +  [StringIO]StringIO                       @ bzrlib.builtins:20
 25.0  25.0 +  [cmd_resolve, cmd_conflicts, resto       @ bzrlib.builtins:4471
 18.0  18.0 +  [cmd_versionedfile_list, cmd_weave       @ bzrlib.builtins:4476
 16.0  16.0 +  [cmd_sign_my_commits]bzrlib.sign_m       @ bzrlib.builtins:4475
281.0  87.0   [WorkingTreeFormat]bzrlib.workingt        @ bzrlib.bzrdir:1360
117.0  32.0 + bzrlib.mutabletree                        @ bzrlib.workingtree:90
 85.0  21.0 ++  [errors, osutils, tree]bzrlib           @ bzrlib.mutabletree:36
 27.0  24.0 +++  [delta, osutils, revision, conflic     @ bzrlib.tree:25
  2.0   2.0 ++++  [mutter]bzrlib.trace                  @ bzrlib.delta:22
  1.0   1.0 ++++  [errors, osutils]bzrlib               @ bzrlib.delta:17
 20.0  20.0 +++  [deque]collections                     @ bzrlib.tree:21
 16.0  16.0 +++  [InterObject]bzrlib.inter              @ bzrlib.tree:36
  1.0   1.0 +++  [needs_read_lock]bzrlib.decorators     @ bzrlib.tree:32
 47.0  45.0 + [l]  [WorkingTreeFormat4]bzrlib.wor       @ bzrlib.workingtree:2949
  1.0   1.0 ++  [deprecated_passed, deprecated_met      @ bzrlib.workingtree_4:92
  1.0   1.0 ++  [InterTree]bzrlib.tree                  @ bzrlib.workingtree_4:88
 30.0  30.0 +  [InventoryEntry, Inventory, ROOT_I       @ bzrlib.workingtree:87
281.0 100.0  [l] urllib                                 @ bzrlib.urlutils:70
180.0  53.0 + socket                                    @ urllib:26
 78.0  78.0 ++ _ssl                                     @ socket:50
 48.0  48.0 ++ _socket                                  @ socket:45
  1.0   1.0 ++  [*]_socket                              @ socket:46
  1.0   1.0 +  [urljoin]urlparse                        @ urllib:30
234.0  32.0  [l]  [dirstate]bzrlib                      @ bzrlib.workingtree_4:270
164.0  28.0 +  [cache_utf8, debug, errors, invent       @ bzrlib.dirstate:214
 63.0  63.0 ++ win32con                                 @ bzrlib.lock:92
 61.0  61.0 ++ msvcrt                                   @ bzrlib.lock:97
 12.0  12.0 ++ fcntl                                    @ bzrlib.lock:87
 16.0  15.0 +  [_read_dirblocks_py, bisect_dirblo       @ bzrlib.dirstate:2666
  1.0   1.0 ++ os                                       @ bzrlib._dirstate_helpers_py:19
 13.0  13.0 + binascii                                  @ bzrlib.dirstate:204
  9.0   9.0 +  [_read_dirblocks_c, bisect_dirbloc       @ bzrlib.dirstate:2658
 86.0  40.0  copy                                       @ bzrlib.inspect_for_copy:72
 46.0  46.0 +  [PyStringMap]org.python.core             @ copy:59
 83.0  15.0   [show_version]bzrlib.version              @ bzrlib.builtins:2682
 68.0  52.0 +  [Branch]bzrlib.branch                    @ bzrlib.version:30
 16.0  15.0 ++  [Hooks]bzrlib.hooks                     @ bzrlib.branch:57
  1.0   1.0 +++  [lazy_import]bzrlib.lazy_import        @ bzrlib.hooks:19
 52.0  52.0   [RepositoryFormat]bzrlib.repositor        @ bzrlib.bzrdir:1352
 37.0  26.0  [l]  [KnitRevisionStore]bzrlib.stor        @ bzrlib.repofmt.knitrepo:381
  7.0   7.0 +  [StringIO]cStringIO                      @ bzrlib.store.revision:24
  4.0   4.0 +  [lazy_import]bzrlib.lazy_import          @ bzrlib.store.revision:26
 35.0  19.0  bzrlib.ui                                  @ bzrlib.commands:789
 12.0  12.0 + sys                                       @ bzrlib.ui:31
  4.0   4.0 +  [lazy_import]bzrlib.lazy_import          @ bzrlib.ui:33
 29.0  28.0  [l]  [fnmatch]fnmatch                      @ bzrlib.config:499
  1.0   1.0 + re                                        @ fnmatch:13
 25.0  12.0  bzrlib.breakin                             @ __main__:84
 13.0  13.0 + signal                                    @ bzrlib.breakin:18
 20.0  20.0  [l]  [DisabledTags]bzrlib.tag              @ bzrlib.branch:99
 18.0  18.0   [*]encodings.utf_8                        @ encodings:97
 16.0  15.0   [TextUIFactory]bzrlib.ui.text             @ bzrlib.commands:790
  1.0   1.0 + sys                                       @ bzrlib.ui.text:22
 15.0  15.0  bzrlib.lazy_regex                          @ __main__:81
 14.0  14.0  [l]  [debug]bzrlib                         @ bzrlib.trace:132
 12.0  12.0  [l] posixpath                              @ bzrlib.osutils:266
 12.0  12.0  bzrlib.inspect_for_copy                    @ __main__:78
 10.0  10.0  bzrlib.decorators                          @ __main__:87
  9.0   9.0  [l] errno                                  @ bzrlib.transport.local:146
  1.0   1.0  os                                         @ fnmatch:35
  1.0   1.0  [l]  [xml5]bzrlib                          @ bzrlib.store.revision:42
  1.0   1.0   [normalize]locale                         @ gettext:131
  1.0   1.0  os                                         @ fnmatch:35
  1.0   1.0  sre_parse                                  @ sre_compile:505
  1.0   1.0  [l]  [trace]bzrlib                         @ bzrlib.commands:687
  1.0   1.0  stat                                       @ bzrlib.trace:161
  1.0   1.0  bzrlib.trace                               @ __main__:97


-- 
Welcome to FOSS revolution: we fix and modify until it shines




More information about the bazaar mailing list