Issue34861
This issue tracker has been migrated to GitHub,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
Created on 2018-10-01 11:13 by Anders.Hovmöller, last changed 2022-04-11 14:59 by admin.
Pull Requests | |||
---|---|---|---|
URL | Status | Linked | Edit |
PR 9655 | open | Anders.Hovmöller, 2018-10-01 11:15 | |
PR 13083 | open | python-dev, 2019-05-04 18:07 | |
PR 31929 | merged | python-dev, 2022-03-16 07:54 |
Messages (6) | |||
---|---|---|---|
msg326793 - (view) | Author: Anders Hovmöller (Anders.Hovmöller) * | Date: 2018-10-01 11:13 | |
The standard output for cProfile when run from a command line is not very useful. It has two main flaws: - Default sort order is by name of function - It strips the full path of source files The first makes it very hard to look at the output. The second is very annoying when you get a bunch of __init__.py in the output. Suggested solution: - Default cumulative time sort order - Show one additional folder level when filename is __main__ or __init__ |
|||
msg327147 - (view) | Author: Giampaolo Rodola' (giampaolo.rodola) * | Date: 2018-10-05 16:20 | |
Can you paste a sample output showing how it looks like pre and post patch? |
|||
msg327149 - (view) | Author: Anders Hovmöller (Anders.Hovmöller) * | Date: 2018-10-05 16:28 | |
There is an example output on github. Should I paste it here too? I can do it once I get home if you want. |
|||
msg327279 - (view) | Author: Anders Hovmöller (Anders.Hovmöller) * | Date: 2018-10-07 13:39 | |
Output before this patch: 3666 function calls (3556 primitive calls) in 0.005 seconds Ordered by: standard name ncalls tottime percall cumtime percall filename:lineno(function) 2 0.000 0.000 0.002 0.001 <frozen importlib._bootstrap>:1009(_handle_fromlist) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:103(release) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:143(__init__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:147(__enter__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:151(__exit__) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:157(_get_module_lock) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:176(cb) 2 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:194(_lock_unlock_module) 7/1 0.000 0.000 0.003 0.003 <frozen importlib._bootstrap>:211(_call_with_frames_removed) 53 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:222(_verbose_message) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:307(__init__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:311(__enter__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:318(__exit__) 20 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:321(<genexpr>) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:35(_new_module) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:369(__init__) 9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:403(cached) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:416(parent) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:424(has_location) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:504(_init_module_attrs) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:576(module_from_spec) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:58(__init__) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:663(_load_unlocked) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:719(find_spec) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:78(acquire) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:792(find_spec) 15 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:855(__enter__) 15 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:859(__exit__) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:882(_find_spec) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:978(_find_and_load) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1072(__init__) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1083(create_module) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1091(exec_module) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1233(_path_hooks) 12 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1246(_path_importer_cache) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1283(_get_spec) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1315(find_spec) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1362(__init__) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1368(<genexpr>) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1394(_get_spec) 10 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1399(find_spec) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1447(_fill_cache) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1476(<setcomp>) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1488(path_hook_for_FileFinder) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:282(cache_from_source) 10 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:36(_relax_case) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:412(_get_cached) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:444(_check_name_wrapper) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:481(_classify_pyc) 12 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:51(_r_long) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:514(_validate_timestamp_pyc) 51 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:56(_path_join) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:566(_compile_bytecode) 51 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:58(<listcomp>) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:617(spec_from_file_location) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:62(_path_split) 23 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:74(_path_stat) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:762(create_module) 4/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap_external>:765(exec_module) 4 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:836(get_code) 9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:84(_path_is_mode_type) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:927(__init__) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:93(_path_isfile) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:952(get_filename) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:957(get_data) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:98(_path_isdir) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:994(path_stats) 100 0.000 0.000 0.001 0.000 __init__.py:183(dumps) 1 0.000 0.000 0.003 0.003 __init__.py:97(<module>) 1 0.000 0.000 0.002 0.002 decoder.py:2(<module>) 1 0.000 0.000 0.000 0.000 decoder.py:20(JSONDecodeError) 1 0.000 0.000 0.000 0.000 decoder.py:254(JSONDecoder) 1 0.000 0.000 0.000 0.000 decoder.py:284(__init__) 1 0.000 0.000 0.000 0.000 encoder.py:104(__init__) 100 0.000 0.000 0.000 0.000 encoder.py:182(encode) 1 0.000 0.000 0.001 0.001 encoder.py:2(<module>) 100 0.000 0.000 0.000 0.000 encoder.py:204(iterencode) 1 0.000 0.000 0.000 0.000 encoder.py:73(JSONEncoder) 20 0.000 0.000 0.000 0.000 enum.py:275(__call__) 20 0.000 0.000 0.000 0.000 enum.py:525(__new__) 23 0.000 0.000 0.000 0.000 enum.py:602(name) 5 0.000 0.000 0.000 0.000 enum.py:607(value) 2 0.000 0.000 0.000 0.000 enum.py:765(_missing_) 2 0.000 0.000 0.000 0.000 enum.py:772(_create_pseudo_member_) 4 0.000 0.000 0.000 0.000 enum.py:802(__or__) 6 0.000 0.000 0.000 0.000 enum.py:808(__and__) 3 0.000 0.000 0.000 0.000 enum.py:827(_high_bit) 2 0.000 0.000 0.000 0.000 enum.py:844(_decompose) 2 0.000 0.000 0.000 0.000 enum.py:862(<listcomp>) 5 0.000 0.000 0.000 0.000 enum.py:873(<lambda>) 5 0.000 0.000 0.000 0.000 enum.py:879(_power_of_two) 6 0.000 0.000 0.001 0.000 re.py:232(compile) 6 0.000 0.000 0.001 0.000 re.py:271(_compile) 1 0.000 0.000 0.001 0.001 scanner.py:2(<module>) 14 0.000 0.000 0.000 0.000 sre_compile.py:249(_compile_charset) 14 0.000 0.000 0.000 0.000 sre_compile.py:276(_optimize_charset) 4 0.000 0.000 0.000 0.000 sre_compile.py:411(_mk_bitmap) 4 0.000 0.000 0.000 0.000 sre_compile.py:413(<listcomp>) 9 0.000 0.000 0.000 0.000 sre_compile.py:423(_simple) 13 0.000 0.000 0.000 0.000 sre_compile.py:453(_get_iscased) 8/5 0.000 0.000 0.000 0.000 sre_compile.py:461(_get_literal_prefix) 5 0.000 0.000 0.000 0.000 sre_compile.py:492(_get_charset_prefix) 6 0.000 0.000 0.000 0.000 sre_compile.py:536(_compile_info) 12 0.000 0.000 0.000 0.000 sre_compile.py:595(isstring) 6 0.000 0.000 0.001 0.000 sre_compile.py:598(_code) 12 0.000 0.000 0.000 0.000 sre_compile.py:65(_combine_flags) 25/6 0.000 0.000 0.000 0.000 sre_compile.py:71(_compile) 6 0.000 0.000 0.001 0.000 sre_compile.py:759(compile) 26 0.000 0.000 0.000 0.000 sre_parse.py:111(__init__) 52 0.000 0.000 0.000 0.000 sre_parse.py:160(__len__) 123 0.000 0.000 0.000 0.000 sre_parse.py:164(__getitem__) 10 0.000 0.000 0.000 0.000 sre_parse.py:168(__setitem__) 25 0.000 0.000 0.000 0.000 sre_parse.py:172(append) 31/12 0.000 0.000 0.000 0.000 sre_parse.py:174(getwidth) 6 0.000 0.000 0.000 0.000 sre_parse.py:224(__init__) 102 0.000 0.000 0.000 0.000 sre_parse.py:233(__next) 71 0.000 0.000 0.000 0.000 sre_parse.py:249(match) 71 0.000 0.000 0.000 0.000 sre_parse.py:254(get) 4 0.000 0.000 0.000 0.000 sre_parse.py:258(getwhile) 38 0.000 0.000 0.000 0.000 sre_parse.py:286(tell) 16 0.000 0.000 0.000 0.000 sre_parse.py:295(_class_escape) 4 0.000 0.000 0.000 0.000 sre_parse.py:355(_escape) 9 0.000 0.000 0.000 0.000 sre_parse.py:432(_uniq) 13/6 0.000 0.000 0.001 0.000 sre_parse.py:441(_parse_sub) 15/6 0.000 0.000 0.001 0.000 sre_parse.py:499(_parse) 6 0.000 0.000 0.000 0.000 sre_parse.py:76(__init__) 24 0.000 0.000 0.000 0.000 sre_parse.py:81(groups) 6 0.000 0.000 0.000 0.000 sre_parse.py:84(opengroup) 6 0.000 0.000 0.000 0.000 sre_parse.py:927(fix_flags) 6 0.000 0.000 0.001 0.000 sre_parse.py:943(parse) 6 0.000 0.000 0.000 0.000 sre_parse.py:96(closegroup) 1 0.000 0.000 0.005 0.005 stats_test.py:1(<module>) 28 0.000 0.000 0.000 0.000 types.py:164(__get__) 2 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x10402e370} 4 0.000 0.000 0.000 0.000 {built-in method _imp._fix_co_filename} 27 0.000 0.000 0.000 0.000 {built-in method _imp.acquire_lock} 1 0.000 0.000 0.000 0.000 {built-in method _imp.create_dynamic} 1 0.000 0.000 0.000 0.000 {built-in method _imp.exec_dynamic} 2 0.000 0.000 0.000 0.000 {built-in method _imp.is_builtin} 5 0.000 0.000 0.000 0.000 {built-in method _imp.is_frozen} 27 0.000 0.000 0.000 0.000 {built-in method _imp.release_lock} 6 0.000 0.000 0.000 0.000 {built-in method _sre.compile} 10 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock} 14 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} 3 0.000 0.000 0.000 0.000 {built-in method builtins.__build_class__} 1 0.000 0.000 0.002 0.002 {built-in method builtins.__import__} 5 0.000 0.000 0.000 0.000 {built-in method builtins.any} 32 0.000 0.000 0.000 0.000 {built-in method builtins.chr} 5/1 0.000 0.000 0.005 0.005 {built-in method builtins.exec} 30 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} 22 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} 389 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 331/303 0.000 0.000 0.000 0.000 {built-in method builtins.len} 4 0.000 0.000 0.000 0.000 {built-in method builtins.max} 59 0.000 0.000 0.000 0.000 {built-in method builtins.min} 17 0.000 0.000 0.000 0.000 {built-in method builtins.ord} 3 0.000 0.000 0.000 0.000 {built-in method builtins.setattr} 12 0.000 0.000 0.000 0.000 {built-in method from_bytes} 4 0.000 0.000 0.000 0.000 {built-in method marshal.loads} 13 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 2 0.000 0.000 0.000 0.000 {built-in method posix.getcwd} 1 0.000 0.000 0.000 0.000 {built-in method posix.listdir} 23 0.000 0.000 0.000 0.000 {built-in method posix.stat} 312 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects} 3 0.000 0.000 0.000 0.000 {method 'bit_length' of 'int' objects} 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} 6 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects} 12 0.000 0.000 0.000 0.000 {method 'extend' of 'list' objects} 48 0.000 0.000 0.000 0.000 {method 'find' of 'bytearray' objects} 33 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 38 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} 1 0.000 0.000 0.000 0.000 {method 'insert' of 'list' objects} 8 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects} 159 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects} 6 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects} 4 0.000 0.000 0.000 0.000 {method 'read' of '_io.FileIO' objects} 38 0.000 0.000 0.000 0.000 {method 'rpartition' of 'str' objects} 110 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 34 0.000 0.000 0.000 0.000 {method 'setdefault' of 'dict' objects} 2 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects} 2 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 4 0.000 0.000 0.000 0.000 {method 'translate' of 'bytearray' objects} After: 3666 function calls (3556 primitive calls) in 0.005 seconds Ordered by: cumulative time ncalls tottime percall cumtime percall filename:lineno(function) 5/1 0.000 0.000 0.005 0.005 {built-in method builtins.exec} 1 0.000 0.000 0.005 0.005 stats_test.py:1(<module>) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:978(_find_and_load) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:663(_load_unlocked) 4/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap_external>:765(exec_module) 7/1 0.000 0.000 0.004 0.004 <frozen importlib._bootstrap>:211(_call_with_frames_removed) 1 0.000 0.000 0.004 0.004 json/__init__.py:97(<module>) 1 0.000 0.000 0.002 0.002 decoder.py:2(<module>) 2 0.000 0.000 0.002 0.001 <frozen importlib._bootstrap>:1009(_handle_fromlist) 1 0.000 0.000 0.002 0.002 {built-in method builtins.__import__} 6 0.000 0.000 0.001 0.000 re.py:232(compile) 6 0.000 0.000 0.001 0.000 re.py:271(_compile) 6 0.000 0.000 0.001 0.000 sre_compile.py:759(compile) 1 0.000 0.000 0.001 0.001 scanner.py:2(<module>) 6 0.000 0.000 0.001 0.000 sre_parse.py:943(parse) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap>:882(_find_spec) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1315(find_spec) 5 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1283(_get_spec) 13/6 0.000 0.000 0.001 0.000 sre_parse.py:441(_parse_sub) 4 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:836(get_code) 15/6 0.000 0.000 0.001 0.000 sre_parse.py:499(_parse) 1 0.000 0.000 0.001 0.001 encoder.py:2(<module>) 100 0.000 0.000 0.001 0.000 json/__init__.py:183(dumps) 10 0.000 0.000 0.001 0.000 <frozen importlib._bootstrap_external>:1399(find_spec) 100 0.000 0.000 0.000 0.000 encoder.py:182(encode) 6 0.000 0.000 0.000 0.000 sre_compile.py:598(_code) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:576(module_from_spec) 25/6 0.000 0.000 0.000 0.000 sre_compile.py:71(_compile) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1083(create_module) 1 0.000 0.000 0.000 0.000 {built-in method _imp.create_dynamic} 100 0.000 0.000 0.000 0.000 encoder.py:204(iterencode) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:566(_compile_bytecode) 23 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:74(_path_stat) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:957(get_data) 23 0.000 0.000 0.000 0.000 {built-in method posix.stat} 4 0.000 0.000 0.000 0.000 {built-in method marshal.loads} 14 0.000 0.000 0.000 0.000 sre_compile.py:276(_optimize_charset) 6 0.000 0.000 0.000 0.000 sre_compile.py:536(_compile_info) 20 0.000 0.000 0.000 0.000 enum.py:275(__call__) 51 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:56(_path_join) 4 0.000 0.000 0.000 0.000 enum.py:802(__or__) 12 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1246(_path_importer_cache) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:504(_init_module_attrs) 9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:84(_path_is_mode_type) 20 0.000 0.000 0.000 0.000 enum.py:525(__new__) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:93(_path_isfile) 4 0.000 0.000 0.000 0.000 {method 'read' of '_io.FileIO' objects} 31/12 0.000 0.000 0.000 0.000 sre_parse.py:174(getwidth) 2 0.000 0.000 0.000 0.000 enum.py:765(_missing_) 2 0.000 0.000 0.000 0.000 enum.py:772(_create_pseudo_member_) 123 0.000 0.000 0.000 0.000 sre_parse.py:164(__getitem__) 389 0.000 0.000 0.000 0.000 {built-in method builtins.isinstance} 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:282(cache_from_source) 71 0.000 0.000 0.000 0.000 sre_parse.py:254(get) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1447(_fill_cache) 102 0.000 0.000 0.000 0.000 sre_parse.py:233(__next) 3 0.000 0.000 0.000 0.000 {built-in method builtins.__build_class__} 2 0.000 0.000 0.000 0.000 enum.py:844(_decompose) 6 0.000 0.000 0.000 0.000 sre_parse.py:96(closegroup) 9 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:403(cached) 1 0.000 0.000 0.000 0.000 {built-in method posix.listdir} 51 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:58(<listcomp>) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:147(__enter__) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:994(path_stats) 2 0.000 0.000 0.000 0.000 {built-in method posix.getcwd} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:412(_get_cached) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1233(_path_hooks) 331/303 0.000 0.000 0.000 0.000 {built-in method builtins.len} 312 0.000 0.000 0.000 0.000 {method 'append' of 'list' objects} 33 0.000 0.000 0.000 0.000 {method 'format' of 'str' objects} 6 0.000 0.000 0.000 0.000 enum.py:808(__and__) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:157(_get_module_lock) 16 0.000 0.000 0.000 0.000 sre_parse.py:295(_class_escape) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1394(_get_spec) 4 0.000 0.000 0.000 0.000 sre_compile.py:411(_mk_bitmap) 2 0.000 0.000 0.000 0.000 enum.py:862(<listcomp>) 71 0.000 0.000 0.000 0.000 sre_parse.py:249(match) 6 0.000 0.000 0.000 0.000 sre_parse.py:927(fix_flags) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1488(path_hook_for_FileFinder) 14 0.000 0.000 0.000 0.000 sre_compile.py:249(_compile_charset) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:318(__exit__) 25 0.000 0.000 0.000 0.000 sre_parse.py:172(append) 9 0.000 0.000 0.000 0.000 sre_compile.py:423(_simple) 159 0.000 0.000 0.000 0.000 {method 'join' of 'str' objects} 30 0.000 0.000 0.000 0.000 {built-in method builtins.getattr} 59 0.000 0.000 0.000 0.000 {built-in method builtins.min} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:151(__exit__) 53 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:222(_verbose_message) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:481(_classify_pyc) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:78(acquire) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:617(spec_from_file_location) 38 0.000 0.000 0.000 0.000 sre_parse.py:286(tell) 6 0.000 0.000 0.000 0.000 sre_parse.py:224(__init__) 48 0.000 0.000 0.000 0.000 {method 'find' of 'bytearray' objects} 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:103(release) 8/5 0.000 0.000 0.000 0.000 sre_compile.py:461(_get_literal_prefix) 26 0.000 0.000 0.000 0.000 sre_parse.py:111(__init__) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:62(_path_split) 4 0.000 0.000 0.000 0.000 sre_compile.py:413(<listcomp>) 38 0.000 0.000 0.000 0.000 {method 'rpartition' of 'str' objects} 22 0.000 0.000 0.000 0.000 {built-in method builtins.hasattr} 2 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:194(_lock_unlock_module) 9 0.000 0.000 0.000 0.000 sre_parse.py:432(_uniq) 6 0.000 0.000 0.000 0.000 {built-in method _sre.compile} 12 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:51(_r_long) 6 0.000 0.000 0.000 0.000 sre_parse.py:84(opengroup) 52 0.000 0.000 0.000 0.000 sre_parse.py:160(__len__) 38 0.000 0.000 0.000 0.000 {method 'get' of 'dict' objects} 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:98(_path_isdir) 28 0.000 0.000 0.000 0.000 types.py:164(__get__) 5 0.000 0.000 0.000 0.000 sre_compile.py:492(_get_charset_prefix) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:514(_validate_timestamp_pyc) 1 0.000 0.000 0.000 0.000 decoder.py:284(__init__) 110 0.000 0.000 0.000 0.000 {method 'rstrip' of 'str' objects} 32 0.000 0.000 0.000 0.000 {built-in method builtins.chr} 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1362(__init__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:58(__init__) 4 0.000 0.000 0.000 0.000 sre_parse.py:258(getwhile) 34 0.000 0.000 0.000 0.000 {method 'setdefault' of 'dict' objects} 5 0.000 0.000 0.000 0.000 {built-in method builtins.any} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:176(cb) 15 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:855(__enter__) 12 0.000 0.000 0.000 0.000 {method 'extend' of 'list' objects} 12 0.000 0.000 0.000 0.000 sre_compile.py:595(isstring) 24 0.000 0.000 0.000 0.000 sre_parse.py:81(groups) 12 0.000 0.000 0.000 0.000 {built-in method from_bytes} 27 0.000 0.000 0.000 0.000 {built-in method _imp.acquire_lock} 15 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:859(__exit__) 12 0.000 0.000 0.000 0.000 sre_compile.py:65(_combine_flags) 10 0.000 0.000 0.000 0.000 sre_parse.py:168(__setitem__) 6 0.000 0.000 0.000 0.000 {method 'endswith' of 'str' objects} 27 0.000 0.000 0.000 0.000 {built-in method _imp.release_lock} 4 0.000 0.000 0.000 0.000 {built-in method _imp._fix_co_filename} 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:35(_new_module) 10 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:36(_relax_case) 20 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:321(<genexpr>) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:792(find_spec) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:444(_check_name_wrapper) 5 0.000 0.000 0.000 0.000 enum.py:879(_power_of_two) 2 0.000 0.000 0.000 0.000 {method 'sort' of 'list' objects} 5 0.000 0.000 0.000 0.000 {built-in method _imp.is_frozen} 10 0.000 0.000 0.000 0.000 {built-in method _thread.allocate_lock} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:311(__enter__) 7 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:416(parent) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1091(exec_module) 6 0.000 0.000 0.000 0.000 sre_parse.py:76(__init__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:369(__init__) 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:719(find_spec) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1476(<setcomp>) 4 0.000 0.000 0.000 0.000 sre_parse.py:355(_escape) 4 0.000 0.000 0.000 0.000 {method 'translate' of 'bytearray' objects} 17 0.000 0.000 0.000 0.000 {built-in method builtins.ord} 3 0.000 0.000 0.000 0.000 {built-in method builtins.setattr} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:143(__init__) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:927(__init__) 23 0.000 0.000 0.000 0.000 enum.py:602(name) 3 0.000 0.000 0.000 0.000 enum.py:827(_high_bit) 2 0.000 0.000 0.000 0.000 {built-in method __new__ of type object at 0x10fe1c370} 2 0.000 0.000 0.000 0.000 {method 'startswith' of 'str' objects} 2 0.000 0.000 0.000 0.000 {built-in method _imp.is_builtin} 13 0.000 0.000 0.000 0.000 {built-in method posix.fspath} 14 0.000 0.000 0.000 0.000 {built-in method _thread.get_ident} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:307(__init__) 8 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1368(<genexpr>) 1 0.000 0.000 0.000 0.000 decoder.py:254(JSONDecoder) 5 0.000 0.000 0.000 0.000 enum.py:607(value) 13 0.000 0.000 0.000 0.000 sre_compile.py:453(_get_iscased) 1 0.000 0.000 0.000 0.000 encoder.py:104(__init__) 1 0.000 0.000 0.000 0.000 encoder.py:73(JSONEncoder) 1 0.000 0.000 0.000 0.000 {method 'insert' of 'list' objects} 3 0.000 0.000 0.000 0.000 {method 'bit_length' of 'int' objects} 8 0.000 0.000 0.000 0.000 {method 'items' of 'dict' objects} 4 0.000 0.000 0.000 0.000 {built-in method builtins.max} 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:762(create_module) 1 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:1072(__init__) 1 0.000 0.000 0.000 0.000 decoder.py:20(JSONDecodeError) 5 0.000 0.000 0.000 0.000 enum.py:873(<lambda>) 6 0.000 0.000 0.000 0.000 {method 'lower' of 'str' objects} 1 0.000 0.000 0.000 0.000 {built-in method _imp.exec_dynamic} 5 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap>:424(has_location) 4 0.000 0.000 0.000 0.000 <frozen importlib._bootstrap_external>:952(get_filename) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} The sorting is easy to see, but the other change is that this line: 100 0.000 0.000 0.001 0.000 __init__.py:183(dumps) ...now looks like this: 100 0.000 0.000 0.001 0.000 json/__init__.py:183(dumps) |
|||
msg415856 - (view) | Author: Daniël van Noord (danielnoord) * | Date: 2022-03-23 07:35 | |
I have resubmitted the patch that changes the default sorting order in https://github.com/python/cpython/pull/31929 as it was asked to separate that from the original patch by Anders. I also added documentation changes that follow from changing the default sorting order. |
|||
msg416338 - (view) | Author: Pablo Galindo Salgado (pablogsal) * | Date: 2022-03-30 11:10 | |
New changeset 75eee1d57eb28283a8682a660d9949afc89fd010 by Daniël van Noord in branch 'main': bpo-34861: Make cumtime the default sorting key for cProfile (GH-31929) https://github.com/python/cpython/commit/75eee1d57eb28283a8682a660d9949afc89fd010 |
History | |||
---|---|---|---|
Date | User | Action | Args |
2022-04-11 14:59:06 | admin | set | github: 79042 |
2022-03-30 11:10:24 | pablogsal | set | nosy:
+ pablogsal messages: + msg416338 |
2022-03-23 07:35:34 | danielnoord | set | nosy:
+ danielnoord messages: + msg415856 |
2022-03-16 07:54:10 | python-dev | set | nosy:
+ python-dev pull_requests: + pull_request30020 |
2019-05-04 18:07:13 | python-dev | set | pull_requests: + pull_request12998 |
2018-10-07 13:39:45 | Anders.Hovmöller | set | messages: + msg327279 |
2018-10-05 16:28:12 | Anders.Hovmöller | set | messages: + msg327149 |
2018-10-05 16:20:21 | giampaolo.rodola | set | versions: - Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7 |
2018-10-05 16:20:05 | giampaolo.rodola | set | nosy:
+ giampaolo.rodola messages: + msg327147 |
2018-10-01 11:15:33 | Anders.Hovmöller | set | keywords:
+ patch stage: patch review pull_requests: + pull_request9046 |
2018-10-01 11:13:17 | Anders.Hovmöller | create |