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