PEP 454: group_by() is private again
This commit is contained in:
parent
aa3b086113
commit
adc68f3b3d
29
pep-0454.txt
29
pep-0454.txt
|
@ -344,13 +344,10 @@ Snapshot
|
|||
See also ``dump()``.
|
||||
|
||||
|
||||
``group_by(key_type: str, cumulative: bool=False)`` method:
|
||||
``statistics(key_type: str, cumulative: bool=False, compare_to=None)`` method:
|
||||
|
||||
Get statistics as a dictionary, grouped by *key_type*. Return a
|
||||
dictionary ``{key: statistic}`` where the key type depends on
|
||||
*key_type* and *statistic* is a ``Statistic`` instance.
|
||||
|
||||
Available key types:
|
||||
Get statistics as a sorted list of ``Statistic`` instances, grouped
|
||||
by *key_type*:
|
||||
|
||||
===================== ======================== ================================================
|
||||
key_type description type
|
||||
|
@ -362,20 +359,9 @@ Snapshot
|
|||
|
||||
If *cumulative* is ``True``, cumulate size and count of memory
|
||||
blocks of all frames of the traceback of a trace, not only the most
|
||||
recent frame.
|
||||
|
||||
The cumulative mode can only be used with key types ``'filename'``
|
||||
and ``'lineno'`` with tracebacks with at least 2 frames (see
|
||||
``traceback_limit``).
|
||||
|
||||
|
||||
``statistics(key_type: str, cumulative: bool=False, compare_to=None)`` method:
|
||||
|
||||
Get statistics as a sorted list of ``Statistic`` instances, grouped
|
||||
by *key_type*.
|
||||
|
||||
See the ``group_by()`` method for *key_type* and *cumulative*
|
||||
parameters.
|
||||
recent frame. The cumulative mode can only be used with key types
|
||||
``'filename'`` and ``'lineno'`` with ``traceback_limit`` greater
|
||||
than ``1``.
|
||||
|
||||
If *compare_to* is set to a previous ``Snapshot`` instance, compute
|
||||
the differences betwen the two snapshots. Otherwise,
|
||||
|
@ -421,8 +407,7 @@ Statistic
|
|||
``key`` attribute:
|
||||
|
||||
Key identifying the statistic. The key type depends on the
|
||||
*key_type* parameter of the ``Snapshot.group_by()`` or
|
||||
``Snapshot.statistics()`` method.
|
||||
*key_type* parameter of the ``Snapshot.statistics()`` method.
|
||||
|
||||
``count`` attribute:
|
||||
|
||||
|
|
Loading…
Reference in New Issue