René's URL Explorer Experiment


Title: bpo-34861 Make cProfile default output more useful by boxed · Pull Request #9655 · python/cpython · GitHub

Open Graph Title: bpo-34861 Make cProfile default output more useful by boxed · Pull Request #9655 · python/cpython

X Title: bpo-34861 Make cProfile default output more useful by boxed · Pull Request #9655 · python/cpython

Description: Display one folder level for pstats.stripdirs() when filename starts with __ (__init__.py, __main__.py primarily) For a test script: from json import dumps for _ in range(100): dumps(dict(a=1)) The old output is: 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 :1009(_handle_fromlist) 7 0.000 0.000 0.000 0.000 :103(release) 5 0.000 0.000 0.000 0.000 :143(__init__) 5 0.000 0.000 0.000 0.000 :147(__enter__) 5 0.000 0.000 0.000 0.000 :151(__exit__) 7 0.000 0.000 0.000 0.000 :157(_get_module_lock) 5 0.000 0.000 0.000 0.000 :176(cb) 2 0.000 0.000 0.000 0.000 :194(_lock_unlock_module) 7/1 0.000 0.000 0.003 0.003 :211(_call_with_frames_removed) 53 0.000 0.000 0.000 0.000 :222(_verbose_message) 5 0.000 0.000 0.000 0.000 :307(__init__) 5 0.000 0.000 0.000 0.000 :311(__enter__) 5 0.000 0.000 0.000 0.000 :318(__exit__) 20 0.000 0.000 0.000 0.000 :321() 4 0.000 0.000 0.000 0.000 :35(_new_module) 5 0.000 0.000 0.000 0.000 :369(__init__) 9 0.000 0.000 0.000 0.000 :403(cached) 7 0.000 0.000 0.000 0.000 :416(parent) 5 0.000 0.000 0.000 0.000 :424(has_location) 5 0.000 0.000 0.000 0.000 :504(_init_module_attrs) 5 0.000 0.000 0.000 0.000 :576(module_from_spec) 5 0.000 0.000 0.000 0.000 :58(__init__) 5/1 0.000 0.000 0.004 0.004 :663(_load_unlocked) 5 0.000 0.000 0.000 0.000 :719(find_spec) 7 0.000 0.000 0.000 0.000 :78(acquire) 5 0.000 0.000 0.000 0.000 :792(find_spec) 15 0.000 0.000 0.000 0.000 :855(__enter__) 15 0.000 0.000 0.000 0.000 :859(__exit__) 5 0.000 0.000 0.001 0.000 :882(_find_spec) 5/1 0.000 0.000 0.004 0.004 :948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 :978(_find_and_load) 1 0.000 0.000 0.000 0.000 :1072(__init__) 1 0.000 0.000 0.000 0.000 :1083(create_module) 1 0.000 0.000 0.000 0.000 :1091(exec_module) 1 0.000 0.000 0.000 0.000 :1233(_path_hooks) 12 0.000 0.000 0.000 0.000 :1246(_path_importer_cache) 5 0.000 0.000 0.001 0.000 :1283(_get_spec) 5 0.000 0.000 0.001 0.000 :1315(find_spec) 1 0.000 0.000 0.000 0.000 :1362(__init__) 8 0.000 0.000 0.000 0.000 :1368() 5 0.000 0.000 0.000 0.000 :1394(_get_spec) 10 0.000 0.000 0.001 0.000 :1399(find_spec) 1 0.000 0.000 0.000 0.000 :1447(_fill_cache) 1 0.000 0.000 0.000 0.000 :1476() 1 0.000 0.000 0.000 0.000 :1488(path_hook_for_FileFinder) 8 0.000 0.000 0.000 0.000 :282(cache_from_source) 10 0.000 0.000 0.000 0.000 :36(_relax_case) 5 0.000 0.000 0.000 0.000 :412(_get_cached) 4 0.000 0.000 0.000 0.000 :444(_check_name_wrapper) 4 0.000 0.000 0.000 0.000 :481(_classify_pyc) 12 0.000 0.000 0.000 0.000 :51(_r_long) 4 0.000 0.000 0.000 0.000 :514(_validate_timestamp_pyc) 51 0.000 0.000 0.000 0.000 :56(_path_join) 4 0.000 0.000 0.000 0.000 :566(_compile_bytecode) 51 0.000 0.000 0.000 0.000 :58() 5 0.000 0.000 0.000 0.000 :617(spec_from_file_location) 8 0.000 0.000 0.000 0.000 :62(_path_split) 23 0.000 0.000 0.000 0.000 :74(_path_stat) 4 0.000 0.000 0.000 0.000 :762(create_module) 4/1 0.000 0.000 0.004 0.004 :765(exec_module) 4 0.000 0.000 0.001 0.000 :836(get_code) 9 0.000 0.000 0.000 0.000 :84(_path_is_mode_type) 4 0.000 0.000 0.000 0.000 :927(__init__) 8 0.000 0.000 0.000 0.000 :93(_path_isfile) 4 0.000 0.000 0.000 0.000 :952(get_filename) 4 0.000 0.000 0.000 0.000 :957(get_data) 1 0.000 0.000 0.000 0.000 :98(_path_isdir) 4 0.000 0.000 0.000 0.000 :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() 1 0.000 0.000 0.002 0.002 decoder.py:2() 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() 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() 5 0.000 0.000 0.000 0.000 enum.py:873() 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() 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() 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() 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 this change the output is: 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() 5/1 0.000 0.000 0.004 0.004 :978(_find_and_load) 5/1 0.000 0.000 0.004 0.004 :948(_find_and_load_unlocked) 5/1 0.000 0.000 0.004 0.004 :663(_load_unlocked) 4/1 0.000 0.000 0.004 0.004 :765(exec_module) 7/1 0.000 0.000 0.004 0.004 :211(_call_with_frames_removed) 1 0.000 0.000 0.004 0.004 json/__init__.py:97() 1 0.000 0.000 0.002 0.002 decoder.py:2() 2 0.000 0.000 0.002 0.001 :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() 6 0.000 0.000 0.001 0.000 sre_parse.py:943(parse) 5 0.000 0.000 0.001 0.000 :882(_find_spec) 5 0.000 0.000 0.001 0.000 :1315(find_spec) 5 0.000 0.000 0.001 0.000 :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 :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() 100 0.000 0.000 0.001 0.000 json/__init__.py:183(dumps) 10 0.000 0.000 0.001 0.000 :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 :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 :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 :566(_compile_bytecode) 23 0.000 0.000 0.000 0.000 :74(_path_stat) 4 0.000 0.000 0.000 0.000 :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 :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 :1246(_path_importer_cache) 5 0.000 0.000 0.000 0.000 :504(_init_module_attrs) 9 0.000 0.000 0.000 0.000 :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 :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 :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 :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 :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 :58() 5 0.000 0.000 0.000 0.000 :147(__enter__) 4 0.000 0.000 0.000 0.000 :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 :412(_get_cached) 1 0.000 0.000 0.000 0.000 :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 :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 :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() 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 :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 :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 :151(__exit__) 53 0.000 0.000 0.000 0.000 :222(_verbose_message) 4 0.000 0.000 0.000 0.000 :481(_classify_pyc) 7 0.000 0.000 0.000 0.000 :78(acquire) 5 0.000 0.000 0.000 0.000 :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 :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 :62(_path_split) 4 0.000 0.000 0.000 0.000 sre_compile.py:413() 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 :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 :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 :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 :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 :1362(__init__) 5 0.000 0.000 0.000 0.000 :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 :176(cb) 15 0.000 0.000 0.000 0.000 :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 :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 :35(_new_module) 10 0.000 0.000 0.000 0.000 :36(_relax_case) 20 0.000 0.000 0.000 0.000 :321() 5 0.000 0.000 0.000 0.000 :792(find_spec) 4 0.000 0.000 0.000 0.000 :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 :311(__enter__) 7 0.000 0.000 0.000 0.000 :416(parent) 1 0.000 0.000 0.000 0.000 :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 :369(__init__) 5 0.000 0.000 0.000 0.000 :719(find_spec) 1 0.000 0.000 0.000 0.000 :1476() 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 :143(__init__) 4 0.000 0.000 0.000 0.000 :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 :307(__init__) 8 0.000 0.000 0.000 0.000 :1368() 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 :762(create_module) 1 0.000 0.000 0.000 0.000 :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() 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 :424(has_location) 4 0.000 0.000 0.000 0.000 :952(get_filename) 1 0.000 0.000 0.000 0.000 {method 'disable' of '_lsprof.Profiler' objects} https://bugs.python.org/issue34861

Open Graph Description: Display one folder level for pstats.stripdirs() when filename starts with __ (__init__.py, __main__.py primarily) For a test script: from json import dumps for _ in range(100): dumps(dict(a=1...

X Description: Display one folder level for pstats.stripdirs() when filename starts with __ (__init__.py, __main__.py primarily) For a test script: from json import dumps for _ in range(100): dumps(dict(a=1...

Opengraph URL: https://github.com/python/cpython/pull/9655

X: @github

direct link

Domain: github.com

route-pattern/:user_id/:repository/pull/:id/files(.:format)
route-controllerpull_requests
route-actionfiles
fetch-noncev2:7e9aa8d4-13c0-3a6c-b521-0e3930a4adc7
current-catalog-service-hashae870bc5e265a340912cde392f23dad3671a0a881730ffdadd82f2f57d81641b
request-id86C8:374780:25A1A55:3163275:696B19A7
html-safe-nonce8873c8daea8b57cacaa79060b136276b390652726db509b94e395b2dd7b4741c
visitor-payloadeyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4NkM4OjM3NDc4MDoyNUExQTU1OjMxNjMyNzU6Njk2QjE5QTciLCJ2aXNpdG9yX2lkIjoiODE0NDY2Nzc1MzU3NTAyOTE1OSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9
visitor-hmacb1104e0cf5930e34ac74867ce1436a5fbd05b5fb2cfdc954ac7e10dbd71d117a
hovercard-subject-tagpull_request:219339243
github-keyboard-shortcutsrepository,pull-request-list,pull-request-conversation,pull-request-files-changed,copilot
google-site-verificationApib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I
octolytics-urlhttps://collector.github.com/github/collect
analytics-location///pull_requests/show/files
fb:app_id1401488693436528
apple-itunes-appapp-id=1477376905, app-argument=https://github.com/python/cpython/pull/9655/files
twitter:imagehttps://avatars.githubusercontent.com/u/332428?s=400&v=4
twitter:cardsummary_large_image
og:imagehttps://avatars.githubusercontent.com/u/332428?s=400&v=4
og:image:altDisplay one folder level for pstats.stripdirs() when filename starts with __ (__init__.py, __main__.py primarily) For a test script: from json import dumps for _ in range(100): dumps(dict(a=1...
og:site_nameGitHub
og:typeobject
hostnamegithub.com
expected-hostnamegithub.com
None5f99f7c1d70f01da5b93e5ca90303359738944d8ab470e396496262c66e60b8d
turbo-cache-controlno-preview
diff-viewunified
go-importgithub.com/python/cpython git https://github.com/python/cpython.git
octolytics-dimension-user_id1525981
octolytics-dimension-user_loginpython
octolytics-dimension-repository_id81598961
octolytics-dimension-repository_nwopython/cpython
octolytics-dimension-repository_publictrue
octolytics-dimension-repository_is_forkfalse
octolytics-dimension-repository_network_root_id81598961
octolytics-dimension-repository_network_root_nwopython/cpython
turbo-body-classeslogged-out env-production page-responsive full-width
disable-turbotrue
browser-stats-urlhttps://api.github.com/_private/browser/stats
browser-errors-urlhttps://api.github.com/_private/browser/errors
release82560a55c6b2054555076f46e683151ee28a19bc
ui-targetfull
theme-color#1e2327
color-schemelight dark

Links:

Skip to contenthttps://github.com/python/cpython/pull/9655/files#start-of-content
https://github.com/
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F9655%2Ffiles
GitHub CopilotWrite better code with AIhttps://github.com/features/copilot
GitHub SparkBuild and deploy intelligent appshttps://github.com/features/spark
GitHub ModelsManage and compare promptshttps://github.com/features/models
MCP RegistryNewIntegrate external toolshttps://github.com/mcp
ActionsAutomate any workflowhttps://github.com/features/actions
CodespacesInstant dev environmentshttps://github.com/features/codespaces
IssuesPlan and track workhttps://github.com/features/issues
Code ReviewManage code changeshttps://github.com/features/code-review
GitHub Advanced SecurityFind and fix vulnerabilitieshttps://github.com/security/advanced-security
Code securitySecure your code as you buildhttps://github.com/security/advanced-security/code-security
Secret protectionStop leaks before they starthttps://github.com/security/advanced-security/secret-protection
Why GitHubhttps://github.com/why-github
Documentationhttps://docs.github.com
Bloghttps://github.blog
Changeloghttps://github.blog/changelog
Marketplacehttps://github.com/marketplace
View all featureshttps://github.com/features
Enterpriseshttps://github.com/enterprise
Small and medium teamshttps://github.com/team
Startupshttps://github.com/enterprise/startups
Nonprofitshttps://github.com/solutions/industry/nonprofits
App Modernizationhttps://github.com/solutions/use-case/app-modernization
DevSecOpshttps://github.com/solutions/use-case/devsecops
DevOpshttps://github.com/solutions/use-case/devops
CI/CDhttps://github.com/solutions/use-case/ci-cd
View all use caseshttps://github.com/solutions/use-case
Healthcarehttps://github.com/solutions/industry/healthcare
Financial serviceshttps://github.com/solutions/industry/financial-services
Manufacturinghttps://github.com/solutions/industry/manufacturing
Governmenthttps://github.com/solutions/industry/government
View all industrieshttps://github.com/solutions/industry
View all solutionshttps://github.com/solutions
AIhttps://github.com/resources/articles?topic=ai
Software Developmenthttps://github.com/resources/articles?topic=software-development
DevOpshttps://github.com/resources/articles?topic=devops
Securityhttps://github.com/resources/articles?topic=security
View all topicshttps://github.com/resources/articles
Customer storieshttps://github.com/customer-stories
Events & webinarshttps://github.com/resources/events
Ebooks & reportshttps://github.com/resources/whitepapers
Business insightshttps://github.com/solutions/executive-insights
GitHub Skillshttps://skills.github.com
Documentationhttps://docs.github.com
Customer supporthttps://support.github.com
Community forumhttps://github.com/orgs/community/discussions
Trust centerhttps://github.com/trust-center
Partnershttps://github.com/partners
GitHub SponsorsFund open source developershttps://github.com/sponsors
Security Labhttps://securitylab.github.com
Maintainer Communityhttps://maintainers.github.com
Acceleratorhttps://github.com/accelerator
Archive Programhttps://archiveprogram.github.com
Topicshttps://github.com/topics
Trendinghttps://github.com/trending
Collectionshttps://github.com/collections
Enterprise platformAI-powered developer platformhttps://github.com/enterprise
GitHub Advanced SecurityEnterprise-grade security featureshttps://github.com/security/advanced-security
Copilot for BusinessEnterprise-grade AI featureshttps://github.com/features/copilot/copilot-business
Premium SupportEnterprise-grade 24/7 supporthttps://github.com/premium-support
Pricinghttps://github.com/pricing
Search syntax tipshttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
documentationhttps://docs.github.com/search-github/github-code-search/understanding-github-code-search-syntax
Sign in https://github.com/login?return_to=https%3A%2F%2Fgithub.com%2Fpython%2Fcpython%2Fpull%2F9655%2Ffiles
Sign up https://github.com/signup?ref_cta=Sign+up&ref_loc=header+logged+out&ref_page=%2F%3Cuser-name%3E%2F%3Crepo-name%3E%2Fpull_requests%2Fshow%2Ffiles&source=header-repo&source_repo=python%2Fcpython
Reloadhttps://github.com/python/cpython/pull/9655/files
Reloadhttps://github.com/python/cpython/pull/9655/files
Reloadhttps://github.com/python/cpython/pull/9655/files
python https://github.com/python
cpythonhttps://github.com/python/cpython
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
Notifications https://github.com/login?return_to=%2Fpython%2Fcpython
Fork 33.9k https://github.com/login?return_to=%2Fpython%2Fcpython
Star 71.1k https://github.com/login?return_to=%2Fpython%2Fcpython
Code https://github.com/python/cpython
Issues 5k+ https://github.com/python/cpython/issues
Pull requests 2.1k https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects 31 https://github.com/python/cpython/projects
Security Uh oh! There was an error while loading. Please reload this page. https://github.com/python/cpython/security
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
Insights https://github.com/python/cpython/pulse
Code https://github.com/python/cpython
Issues https://github.com/python/cpython/issues
Pull requests https://github.com/python/cpython/pulls
Actions https://github.com/python/cpython/actions
Projects https://github.com/python/cpython/projects
Security https://github.com/python/cpython/security
Insights https://github.com/python/cpython/pulse
Sign up for GitHub https://github.com/signup?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
terms of servicehttps://docs.github.com/terms
privacy statementhttps://docs.github.com/privacy
Sign inhttps://github.com/login?return_to=%2Fpython%2Fcpython%2Fissues%2Fnew%2Fchoose
boxedhttps://github.com/boxed
python:mainhttps://github.com/python/cpython/tree/main
boxed:nicer-cprofile-command-linehttps://github.com/boxed/cpython/tree/nicer-cprofile-command-line
Conversation 34 https://github.com/python/cpython/pull/9655
Commits 1 https://github.com/python/cpython/pull/9655/commits
Checks 35 https://github.com/python/cpython/pull/9655/checks
Files changed 4 https://github.com/python/cpython/pull/9655/files
bpo-34861 Make cProfile default output more useful https://github.com/python/cpython/pull/9655/files#top
Show all changes 1 commit https://github.com/python/cpython/pull/9655/files
f6da3b6 Default cProfile command line to cumulative time boxed Oct 1, 2018 https://github.com/python/cpython/pull/9655/commits/f6da3b61561547588420608bbcf008c227ea7139
Clear filters https://github.com/python/cpython/pull/9655/files
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
cProfile.py https://github.com/python/cpython/pull/9655/files#diff-f1c8cf2527e5bdb7109adfbf1dc678bea64432d4131dd94deea6e3d176ef9736
pstats.py https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
test_pstats.py https://github.com/python/cpython/pull/9655/files#diff-9d8807712f5ecc030975f9b7372afc1d5d9ac16e8ee811d8d01e793cfffab0b0
2020-10-18-13-20-00.bpo-34861.8JanqQ.rst https://github.com/python/cpython/pull/9655/files#diff-e424feebec91150e282b33611d0c94d0fce8fbbceaf06cdeade8f2dcfd26666f
Lib/cProfile.pyhttps://github.com/python/cpython/pull/9655/files#diff-f1c8cf2527e5bdb7109adfbf1dc678bea64432d4131dd94deea6e3d176ef9736
View file https://github.com/python/cpython/blob/f6da3b61561547588420608bbcf008c227ea7139/Lib/cProfile.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/9655/{{ revealButtonHref }}
https://github.com/python/cpython/pull/9655/files#diff-f1c8cf2527e5bdb7109adfbf1dc678bea64432d4131dd94deea6e3d176ef9736
https://github.com/python/cpython/pull/9655/files#diff-f1c8cf2527e5bdb7109adfbf1dc678bea64432d4131dd94deea6e3d176ef9736
Lib/pstats.pyhttps://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
View file https://github.com/python/cpython/blob/f6da3b61561547588420608bbcf008c227ea7139/Lib/pstats.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/9655/{{ revealButtonHref }}
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
https://github.com/python/cpython/pull/9655/files#diff-7a9954f13fa0d5df4c059e938b582cabf11d9f90eed2a44a76fa21091ff99274
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
Lib/test/test_pstats.pyhttps://github.com/python/cpython/pull/9655/files#diff-9d8807712f5ecc030975f9b7372afc1d5d9ac16e8ee811d8d01e793cfffab0b0
View file https://github.com/python/cpython/blob/f6da3b61561547588420608bbcf008c227ea7139/Lib/test/test_pstats.py
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/9655/{{ revealButtonHref }}
https://github.com/python/cpython/pull/9655/files#diff-9d8807712f5ecc030975f9b7372afc1d5d9ac16e8ee811d8d01e793cfffab0b0
https://github.com/python/cpython/pull/9655/files#diff-9d8807712f5ecc030975f9b7372afc1d5d9ac16e8ee811d8d01e793cfffab0b0
Misc/NEWS.d/next/Library/2020-10-18-13-20-00.bpo-34861.8JanqQ.rsthttps://github.com/python/cpython/pull/9655/files#diff-e424feebec91150e282b33611d0c94d0fce8fbbceaf06cdeade8f2dcfd26666f
View file https://github.com/python/cpython/blob/f6da3b61561547588420608bbcf008c227ea7139/Misc/NEWS.d/next/Library/2020-10-18-13-20-00.bpo-34861.8JanqQ.rst
Open in desktop https://desktop.github.com
https://github.co/hiddenchars
https://github.com/python/cpython/pull/9655/{{ revealButtonHref }}
Please reload this pagehttps://github.com/python/cpython/pull/9655/files
https://github.com
Termshttps://docs.github.com/site-policy/github-terms/github-terms-of-service
Privacyhttps://docs.github.com/site-policy/privacy-policies/github-privacy-statement
Securityhttps://github.com/security
Statushttps://www.githubstatus.com/
Communityhttps://github.community/
Docshttps://docs.github.com/
Contacthttps://support.github.com?tags=dotcom-footer

Viewport: width=device-width


URLs of crawlers that visited me.