projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8be7791
)
Close #20814: doc: Fix "Pretty top" example of tracemalloc
author
Victor Stinner
<victor.stinner@gmail.com>
Mon, 3 Mar 2014 10:57:57 +0000
(11:57 +0100)
committer
Victor Stinner
<victor.stinner@gmail.com>
Mon, 3 Mar 2014 10:57:57 +0000
(11:57 +0100)
Doc/library/tracemalloc.rst
patch
|
blob
|
history
diff --git
a/Doc/library/tracemalloc.rst
b/Doc/library/tracemalloc.rst
index b79c5f63e707d31e0be4c69f97536ae32b85f6af..c12ef8785ea33459d44176472ca897f9460b8342 100644
(file)
--- a/
Doc/library/tracemalloc.rst
+++ b/
Doc/library/tracemalloc.rst
@@
-200,8
+200,7
@@
ignoring ``<frozen importlib._bootstrap>`` and ``<unknown>`` files::
# replace "/path/to/module/file.py" with "module/file.py"
filename = os.sep.join(frame.filename.split(os.sep)[-2:])
print("#%s: %s:%s: %.1f KiB"
- % (index, filename, frame.lineno,
- stat.size / 1024))
+ % (index, filename, frame.lineno, stat.size / 1024))
other = top_stats[limit:]
if other:
@@
-215,7
+214,7
@@
ignoring ``<frozen importlib._bootstrap>`` and ``<unknown>`` files::
# ... run your application ...
snapshot = tracemalloc.take_snapshot()
- display_top(snapshot
, 10
)
+ display_top(snapshot)
Example of output of the Python test suite::