[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2022-03-15 Thread Daniël van Noord
Daniël van Noord added the comment: I resubmitted the original patch and updated it with documentation and news item changes. This would still be a valuable addition imo, as it can help single out expensive calls in your module/script. -- nosy: +danielnoord

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2022-03-15 Thread Roundup Robot
Change by Roundup Robot : -- keywords: +patch nosy: +python-dev nosy_count: 5.0 -> 6.0 pull_requests: +30009 pull_request: https://github.com/python/cpython/pull/31919 ___ Python tracker

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2014-02-11 Thread Guillaume Gelin
Changes by Guillaume Gelin cont...@ramnes.eu: -- nosy: +ramnes ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18795 ___ ___ Python-bugs-list

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2014-01-28 Thread Alexandre Dias
Alexandre Dias added the comment: Could I get an update on this please? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18795 ___ ___

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-09-01 Thread Jakub Stasiak
Jakub Stasiak added the comment: I'd change cumulativepercall and totalpercall to cumpercall and percall (and/or intpercall) but that's a detail, this patch works for me. Data structure affected by this patch is produced and consumed internally by the sort method so it looks like nothing

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-23 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +georg.brandl stage: - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18795 ___

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread R. David Murray
R. David Murray added the comment: I believe the module already supports sorting by time and cumulative time (determining the top consumers of cpu is a major part of the point of the profile module, after all). What exactly is the change that you are proposing? If you post a diff instead

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread Alexandre Dias
Alexandre Dias added the comment: It does support sorting by total time and cumulative time spent on a function, but not by the time per each call of that function. I've uploaded a diff of the patch. -Alexandre -- versions: +Python 3.4 -Python 2.7 Added file:

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread R. David Murray
R. David Murray added the comment: It would be clearer, I think, to call it average time. I must admit to not being sure why that is useful. I'm also worried there might be backward compatibility issues with changing the ordering of the data structure. If new fields are going to be added

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread Alexandre Dias
Alexandre Dias added the comment: Average time would indeed be a better description. As for its usefulness: let's say that for example you would want to find the function in which your code spends the most time on average, in order to later optimise said function. If one of the calls to

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-21 Thread R. David Murray
R. David Murray added the comment: There may not be a problem. I'm not familiar enough with the pstats code to review the patch for real without some study. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18795

[issue18795] pstats - allow stats sorting by cumulative time per call and total time per call

2013-08-20 Thread Alexandre Dias
New submission from Alexandre Dias: Me and a couple of colleagues have stumbled upon the need to sometimes sort our profiling stats by time (cumulative and total) per call. I believe this could be useful to other people, and have therefore opened this patch. Thanks for taking the time to look