PEP 454: cleanup
This commit is contained in:
parent
db71db8e68
commit
2492efe21e
20
pep-0454.txt
20
pep-0454.txt
|
@ -369,6 +369,9 @@ the ``Snapshot.add_metric()`` method.
|
|||
Get the size in bytes and the length of the dictionary of Unicode
|
||||
interned strings as a ``(size: int, length: int)`` tuple.
|
||||
|
||||
The size is the size of the dictionary, excluding the size of
|
||||
strings.
|
||||
|
||||
|
||||
DisplayTop
|
||||
----------
|
||||
|
@ -421,11 +424,6 @@ DisplayTop
|
|||
If ``True`` (default value), compare to the previous snapshot. If
|
||||
``False``, compare to the first snapshot.
|
||||
|
||||
``count`` attribute:
|
||||
|
||||
If ``True`` (default value), display the number of allocated memory
|
||||
blocks.
|
||||
|
||||
``filename_parts`` attribute:
|
||||
|
||||
Number of displayed filename parts (int, default: ``3``). Extra
|
||||
|
@ -639,9 +637,9 @@ Metric
|
|||
|
||||
Format of the metric:
|
||||
|
||||
* ``int``: a number
|
||||
* ``percent``: percentage (1.0 means 100%)
|
||||
* ``size``: a size in bytes
|
||||
* ``'int'``: a number
|
||||
* ``'percent'``: percentage, ``1.0`` means ``100%``
|
||||
* ``'size'``: a size in bytes
|
||||
|
||||
|
||||
Snapshot
|
||||
|
@ -762,7 +760,7 @@ Snapshot
|
|||
store more frames.
|
||||
|
||||
The ``tracemalloc`` module must be enabled to take a snapshot. See
|
||||
the the ``enable`` function.
|
||||
the the ``enable()`` function.
|
||||
|
||||
``get_metric(name, default=None)`` method:
|
||||
|
||||
|
@ -868,7 +866,7 @@ StatsDiff
|
|||
Task
|
||||
----
|
||||
|
||||
``Task(func, \*args, \*\*kw)`` class:
|
||||
``Task(func, *args, **kw)`` class:
|
||||
|
||||
Task calling ``func(*args, **kw)``. When scheduled, the task is
|
||||
called when the traced memory is increased or decreased by more than
|
||||
|
@ -998,7 +996,7 @@ TakeSnapshotTask
|
|||
* ``$counter``: counter starting at 1 and incremented at each snapshot,
|
||||
formatted as 4 decimal digits
|
||||
|
||||
The default template is ``tracemalloc-$counter.pickle``.
|
||||
The default template is ``'tracemalloc-$counter.pickle'``.
|
||||
|
||||
``metrics`` attribute:
|
||||
|
||||
|
|
Loading…
Reference in New Issue