msg161508 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-05-24 14:19 |
cProfile reports the profiling result in a table with the headers ncalls tottime percall cumtime percall filename:lineno(function) The respective arguments are calls time - cumulative - nfl Since I had to lookup these different names everytime I used cProfile, I think that it should take the table headings as argument aliases. Also there is inconsistent naming of pcalls between docs and code. In the docs of Stats.sort_stats pcalls is named primitive call count. In the code at Stats.sort_arg_dict_default it was just named call count. I created 4 patches to fix that in Python 2.7 and Python 3.2. The first is attached here, the later will be attached to comments. They apply to 822d7a1f8885 for 2.7 and 89b699e68fa2 for 3.2. I also created a patch for adding percall sorting, but that requires more invasive changes and I did not see a simple name to distinguish between the two bycall headings. |
|
|
msg169983 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-09-07 10:40 |
What would be the best way to get this patch reviewed? |
|
|
msg169984 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-09-07 10:47 |
I'll take a look next week if nobody else do it before. |
|
|
msg170018 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-09-07 23:17 |
Thank you! |
|
|
msg170879 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-09-21 11:02 |
Did you get to taking a look? Is there anything I should change? |
|
|
msg172311 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-07 15:59 |
New changeset cc3e27b7da41 by Andrew Svetlov in branch '2.7': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/cc3e27b7da41 New changeset 410e92589164 by Andrew Svetlov in branch '3.2': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/410e92589164 New changeset fb216fee32db by Andrew Svetlov in branch '3.3': Merge issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/fb216fee32db New changeset bc658b6a1d4e by Andrew Svetlov in branch 'default': Issue #14900: Distuguish call count and primitive call count in pstat output. http://hg.python.org/cpython/rev/bc658b6a1d4e |
|
|
msg172312 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-07 16:02 |
I definitely agree with renaming "call count" to "primitive call count". Thank you for patch. BTW please fill Python Contributor Agreement: http://www.python.org/psf/contrib/ |
|
|
msg172315 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-07 16:23 |
New changeset 69b310f7acfa by Andrew Svetlov in branch '2.7': Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/69b310f7acfa New changeset 511a3c51731e by Andrew Svetlov in branch '3.2': Issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/511a3c51731e New changeset 29d4ac311627 by Andrew Svetlov in branch '3.3': Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/29d4ac311627 New changeset 7b8b1b30e5f8 by Andrew Svetlov in branch 'default': Merge issue #14900: Add aliases for sorting params for pstat to follow column names from pstat output. http://hg.python.org/cpython/rev/7b8b1b30e5f8 |
|
|
msg172317 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-07 16:24 |
I'm ok with aliases also. Issue with percall can be fixed only in 3.4 via renaming one of the column. Thanks again. |
|
|
msg172318 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-07 16:28 |
Documentation also need to be updated to reflect changes. |
|
|
msg172347 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-10-07 21:37 |
Copyright-assignment signed and sent. Thanks! |
|
|
msg172371 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-08 10:51 |
Looks like you missed *sort* parameter for ".. function:: run(command, filename=None, sort=-1)" Also it will be nice to insert link to Stats.sort_stats in doc text for run functions. |
|
|
msg172382 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-10-08 14:42 |
Jepp, I missed that. I hope the added patches clear that up. |
|
|
msg172385 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-08 15:20 |
Sorry, I cannot figure out what hg repo version should I use to apply sort-argument* patches. Can you prepare 2 cumulative patches for 2.7 and 3.2 which can be applied to current repo state? It's CPython team policy to send patches which can be applied to pure repo if no other rule explicitly specified. Thanks. |
|
|
msg172412 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-10-08 20:40 |
I’ll create them as soon as I get the time. It’s not as if that’s really hard - but I still have to do it (need to diff against current tip - I already merged, so that should work without problems). |
|
|
msg173207 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-17 21:21 |
I'm waiting for your patch. Thanks. |
|
|
msg174362 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2012-10-31 20:06 |
New changeset f263a84871de by Andrew Svetlov in branch '2.7': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/f263a84871de New changeset 52d6974fa05b by Andrew Svetlov in branch '3.2': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/52d6974fa05b New changeset 78963f00d4ad by Andrew Svetlov in branch '3.3': Merge issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/78963f00d4ad New changeset dd4783955353 by Andrew Svetlov in branch 'default': Issue #14900: document added sort keys for profile stats. http://hg.python.org/cpython/rev/dd4783955353 |
|
|
msg174363 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-10-31 20:08 |
Fixed. For future improvements please open new issue. Thanks. |
|
|
msg174431 - (view) |
Author: Arne Babenhauserheide (ArneBab) * |
Date: 2012-11-01 16:42 |
…you were faster than me (I only managed to get the repo onto my current computer yesterday and the children kept me occupied). Thank you! |
|
|
msg174432 - (view) |
Author: Andrew Svetlov (asvetlov) *  |
Date: 2012-11-01 16:51 |
No problems! |
|
|