[issue34861] Improve cProfile standard output

2022-03-30 Thread Pablo Galindo Salgado

Pablo Galindo Salgado  added the comment:


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


--
nosy: +pablogsal

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2022-03-23 Thread Daniël van Noord

Daniël van Noord  added the comment:

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.

--
nosy: +danielnoord

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2022-03-16 Thread Roundup Robot


Change by Roundup Robot :


--
nosy: +python-dev
nosy_count: 2.0 -> 3.0
pull_requests: +30020
pull_request: https://github.com/python/cpython/pull/31929

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2019-05-04 Thread Roundup Robot


Change by Roundup Robot :


--
pull_requests: +12998

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2018-10-07 Thread Anders Hovmöller

Anders Hovmöller  added the comment:

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)
20.0000.0000.0020.001 :1009(_handle_fromlist)
70.0000.0000.0000.000 :103(release)
50.0000.0000.0000.000 :143(__init__)
50.0000.0000.0000.000 :147(__enter__)
50.0000.0000.0000.000 :151(__exit__)
70.0000.0000.0000.000 :157(_get_module_lock)
50.0000.0000.0000.000 :176(cb)
20.0000.0000.0000.000 :194(_lock_unlock_module)
  7/10.0000.0000.0030.003 :211(_call_with_frames_removed)
   530.0000.0000.0000.000 :222(_verbose_message)
50.0000.0000.0000.000 :307(__init__)
50.0000.0000.0000.000 :311(__enter__)
50.0000.0000.0000.000 :318(__exit__)
   200.0000.0000.0000.000 :321()
40.0000.0000.0000.000 :35(_new_module)
50.0000.0000.0000.000 :369(__init__)
90.0000.0000.0000.000 :403(cached)
70.0000.0000.0000.000 :416(parent)
50.0000.0000.0000.000 :424(has_location)
50.0000.0000.0000.000 :504(_init_module_attrs)
50.0000.0000.0000.000 :576(module_from_spec)
50.0000.0000.0000.000 :58(__init__)
  5/10.0000.0000.0040.004 :663(_load_unlocked)
50.0000.0000.0000.000 :719(find_spec)
70.0000.0000.0000.000 :78(acquire)
50.0000.0000.0000.000 :792(find_spec)
   150.0000.0000.0000.000 :855(__enter__)
   150.0000.0000.0000.000 :859(__exit__)
50.0000.0000.0010.000 :882(_find_spec)
  5/10.0000.0000.0040.004 :948(_find_and_load_unlocked)
  5/10.0000.0000.0040.004 :978(_find_and_load)
10.0000.0000.0000.000 :1072(__init__)
10.0000.0000.0000.000 :1083(create_module)
10.0000.0000.0000.000 :1091(exec_module)
10.0000.0000.0000.000 :1233(_path_hooks)
   120.0000.0000.0000.000 :1246(_path_importer_cache)
50.0000.0000.0010.000 :1283(_get_spec)
50.0000.0000.0010.000 :1315(find_spec)
10.0000.0000.0000.000 :1362(__init__)
80.0000.0000.0000.000 :1368()
50.0000.0000.0000.000 :1394(_get_spec)
   100.0000.0000.0010.000 :1399(find_spec)
10.0000.0000.0000.000 :1447(_fill_cache)
10.0000.0000.0000.000 :1476()
10.0000.0000.0000.000 :1488(path_hook_for_FileFinder)
80.0000.0000.0000.000 :282(cache_from_source)
   100.0000.0000.0000.000 :36(_relax_case)
50.0000.0000.0000.000 :412(_get_cached)
40.0000.0000.0000.000 :444(_check_name_wrapper)
40.0000.0000.0000.000 :481(_classify_pyc)
   120.0000.0000.0000.000 :51(_r_long)
40.0000.0000.0000.000 :514(_validate_timestamp_pyc)
   510.0000.0000.0000.000 :56(_path_join)
40.0000.0000.0000.000 :566(_compile_bytecode)
   510.0000.0000.0000.000 :58()
50.0000.0000.0000.000 :617(spec_from_file_location)
80.0000.0000.0000.000 :62(_path_split)
   230.0000.0000.0000.000 :74(_path_stat)
40.0000.0000.0000.000 :762(create_module)
  4/10.0000.0000.0040.004 :765(exec_module)
40.0000.0000.0010.000 :836(get_code)
90.0000.0000.0000.000 :84(_path_is_mode_type)
40.0000.0000.0000.000 :927(__init__)
80.0000.0000.0000.000 :93(_path_isfile)
40.0000.0000.0000.000 :952(get_filename)
40.0000.0000.0000.000 :957(get_data)
10.0000.0000.0000.000 :98(_path_isdir)
40.0000.0000.0000.000 :994(path_stats)
  1000.0000.0000.0010.000 __init__.py:183(dumps)
10.0000.0000.0030.003 __init__.py:97()
10.0000.0000.0020.002 decoder.py:2()
10.0000.0000.0000.000 decoder.py:20(JSONDecodeError)
10.0000.0000.0000.000 decoder.py:254(JSONDecoder)
10.0000.0000.0000.000 

[issue34861] Improve cProfile standard output

2018-10-05 Thread Anders Hovmöller

Anders Hovmöller  added the comment:

There is an example output on github. Should I paste it here too? I can do it 
once I get home if you want.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2018-10-05 Thread Giampaolo Rodola'


Change by Giampaolo Rodola' :


--
versions:  -Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2018-10-05 Thread Giampaolo Rodola'


Giampaolo Rodola'  added the comment:

Can you paste a sample output showing how it looks like pre and post patch?

--
nosy: +giampaolo.rodola

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2018-10-01 Thread Anders Hovmöller

Change by Anders Hovmöller :


--
keywords: +patch
pull_requests: +9046
stage:  -> patch review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue34861] Improve cProfile standard output

2018-10-01 Thread Anders Hovmöller

New submission from Anders Hovmöller :

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__

--
components: Library (Lib)
messages: 326793
nosy: Anders.Hovmöller
priority: normal
severity: normal
status: open
title: Improve cProfile standard output
type: enhancement
versions: Python 2.7, Python 3.4, Python 3.5, Python 3.6, Python 3.7, Python 3.8

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com