New submission from ramiro:
On the documentation page "The Python Profilers"
https://docs.python.org/3.4/library/profile.html#instant-user-s-manual the
following example is given:
p.sort_stats('time', 'cum').print_stats(.5, 'init')
This raises a KeyError, because 'cum' is not available as a sort key to
pstats.Stats.sort_stats. As per the documentation of this method
(https://docs.python.org/3.4/library/profile.html#the-stats-class) you can
either use 'cumulative' or 'cumtime', which both work as expected.
Since 'cumulative' is used a few examples earlier I suggest to use that for
consistency.
Tested with the following Python version:
Python 3.4.3 on Ubuntu 15.04
----------
assignee: docs@python
components: Documentation
messages: 242812
nosy: docs@python, ramiro
priority: normal
severity: normal
status: open
title: 'cum' not a valid sort key for pstats.Stats.sort_stats
type: enhancement
versions: Python 3.4
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue24148>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com