[Python-checkins] peps: PEP 454: replace Statistic.key with Statistic.traceback
victor.stinner
python-checkins at python.org
Tue Nov 5 22:04:36 CET 2013
http://hg.python.org/peps/rev/d0a629d375c1
changeset: 5254:d0a629d375c1
user: Victor Stinner <victor.stinner at gmail.com>
date: Tue Nov 05 22:04:26 2013 +0100
summary:
PEP 454: replace Statistic.key with Statistic.traceback
files:
pep-0454.txt | 45 +++++++++++++++++++--------------------
1 files changed, 22 insertions(+), 23 deletions(-)
diff --git a/pep-0454.txt b/pep-0454.txt
--- a/pep-0454.txt
+++ b/pep-0454.txt
@@ -134,6 +134,17 @@
See also ``start()`` and ``stop()`` functions.
+``start()`` function:
+
+ Start tracing Python memory allocations.
+
+ The function installs hooks on Python memory allocators. These hooks
+ have important overhead in term of performances and memory usage:
+ see `Filter functions`_ to limit the overhead.
+
+ See also ``stop()`` and ``is_tracing()`` functions.
+
+
``stop()`` function:
Stop tracing Python memory allocations and clear traces of memory
@@ -148,17 +159,6 @@
See also ``start()`` and ``is_tracing()`` functions.
-``start()`` function:
-
- Start tracing Python memory allocations.
-
- The function installs hooks on Python memory allocators. These hooks
- have important overhead in term of performances and memory usage:
- see `Filter functions`_ to limit the overhead.
-
- See also ``stop()`` and ``is_tracing()`` functions.
-
-
``take_snapshot()`` function:
Take a snapshot of traces of memory blocks allocated by Python using
@@ -384,18 +384,18 @@
See also ``dump()``.
-``statistics(key_type: str, cumulative: bool=False, compare_to=None)`` method:
+``statistics(group_by: str, cumulative: bool=False, compare_to=None)`` method:
Get statistics as a sorted list of ``Statistic`` instances, grouped
- by *key_type*:
+ by *group_by*:
- ===================== ======================== ================================================
- key_type description type
- ===================== ======================== ================================================
- ``'filename'`` filename ``str``
- ``'lineno'`` filename and line number ``(filename: str, lineno: int)``
- ``'traceback'`` traceback tuple of ``(filename: str, lineno: int)`` tuples
- ===================== ======================== ================================================
+ ===================== ========================
+ group_by description
+ ===================== ========================
+ ``'filename'`` filename
+ ``'lineno'`` filename and line number
+ ``'traceback'`` traceback
+ ===================== ========================
If *cumulative* is ``True``, cumulate size and count of memory
blocks of all frames of the traceback of a trace, not only the most
@@ -442,10 +442,9 @@
``Snapshot.statistics()`` returns a list of ``Statistic`` instances.
-``key`` attribute:
+``traceback`` attribute:
- Key identifying the statistic. The key type depends on the
- *key_type* parameter of the ``Snapshot.statistics()`` method.
+ Tuple of ``(filename: str, lineno: int)`` tuples.
``count`` attribute:
--
Repository URL: http://hg.python.org/peps
More information about the Python-checkins
mailing list