Guppy 3 -- Guppy-PE ported to Python 3
Project description
Guppy 3
A Python Programming Environment & Heap analysis toolset.
This package contains the following subpackages:
- etc - Support modules. Contains especially the Glue protocol module.
- gsl - The Guppy Specification Language implementation. This can be used to create documents and tests from a common source.
- heapy - The heap analysis toolset. It can be used to find information about the objects in the heap and display the information in various ways.
- sets - Bitsets and 'nodesets' implemented in C.
Guppy 3 is a fork of Guppy-PE, created by Sverker Nilsson for Python 2.
Requirements
You should have Python 3.5, 3.6, 3.7, or 3.8. This package is CPython only; PyPy and other Python implementations are not supported. Python 2 support can be obtained from guppy-pe by Sverker Nilsson, from which this package is forked.
To use the graphical browser, Tkinter is needed. To use the remote monitor, threading must be available.
Installation
Install with pip by:
pip install guppy3
Usage
The following example shows
- How to create the session context:
h=hpy()
- How to show the reachable objects in the heap:
h.heap()
- How to show the shortest paths from the root to the single largest object:
h.heap().byid[0].sp
- How to create and show a set of objects:
h.iso(1,[],{})
>>> from guppy import hpy; h=hpy()
>>> h.heap()
Partition of a set of 30976 objects. Total size = 3544220 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 8292 27 739022 21 739022 21 str
1 7834 25 625624 18 1364646 39 tuple
2 2079 7 300624 8 1665270 47 types.CodeType
3 400 1 297088 8 1962358 55 type
4 4168 13 279278 8 2241636 63 bytes
5 1869 6 269136 8 2510772 71 function
6 400 1 228464 6 2739236 77 dict of type
7 79 0 139704 4 2878940 81 dict of module
8 1061 3 93368 3 2972308 84 types.WrapperDescriptorType
9 172 1 81712 2 3054020 86 dict (no owner)
<89 more rows. Type e.g. '_.more' to view.>
>>> h.heap().byid[0].sp
0: h.Root.i0_modules['os'].__dict__
>>> h.iso(1,[],{})
Partition of a set of 3 objects. Total size = 348 bytes.
Index Count % Size % Cumulative % Kind (class / dict of class)
0 1 33 248 71 248 71 dict (no owner)
1 1 33 72 21 320 92 list
2 1 33 28 8 348 100 int
>>>
People have written awesome posts on how to use this toolset, including:
- How to use guppy/heapy for tracking down memory usage
- Debugging Django memory leak with TrackRefs and Guppy
- Diagnosing Memory "Leaks" in Python
- Digging into python memory issues in ckan with heapy
Formal and API documentation are also available.
Contributing
Issues and pull requests are welcome. You may also ask for help on using this toolset; however, in such cases, we will only provide guidance, and not profile your code for you.
Please make sure to update tests as appropriate.
Testing
To test if the heapy build and installation was ok, you can do:
>>> from guppy import hpy
>>> hpy().test()
Testing sets
Test #0
Test #1
Test #2
...
There will be several more tests. Some tests may take a while.
License
Copyright (C) 2005-2013 Sverker Nilsson, S. Nilsson Computer System AB
Copyright (C) 2019 YiFei Zhu
The right is granted to copy, use, modify and redistribute this code according to the rules in what is commonly referred to as an MIT license.
*** USE AT YOUR OWN RISK AND BE AWARE THAT THIS IS AN EARLY RELEASE ***
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
Built Distributions
Hashes for guppy3-3.0.10-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 10781948acb2a4794213751e8dc6387466a30b4f70942d6d9ab2ede5e0622fe5 |
|
MD5 | 5d19b7a2c41f9e15353c3ac1a3e496e6 |
|
BLAKE2b-256 | 80f863b8a701f2b112d6303e437887834d55c7ad1bdf94f07bf1168fa53c7cfd |
Hashes for guppy3-3.0.10-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 748f0f20224b0aabe7775767b5bc424c8716d85fe5b98d67915ea511ef10ce44 |
|
MD5 | bcc8e5f103fe065b0e1dac47b27deffb |
|
BLAKE2b-256 | 71a9ad90ea841d2a9b6609b45d52c15cff6155e493bddc8fa5eb39a261195b60 |
Hashes for guppy3-3.0.10-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31cfb7c71f37406f972614c9f338f166a0a0c15b595234515954ca3ce50b4a0a |
|
MD5 | 6dc5b5e4fae519a29124c91800ae82fb |
|
BLAKE2b-256 | 58242d47e20adf9486bb8a70c4b384ddb4e5db5d3f608641fbd7d0f65e868730 |
Hashes for guppy3-3.0.10-cp38-cp38-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e338097a516d57db0b576e6a16a88f4a9e52f6de88e794c06017f96ff1af05fa |
|
MD5 | b11923c8ec3cac7fe224c536881c6bf0 |
|
BLAKE2b-256 | 6a2bf9741f3f2e91567482e3f3836db2ebcec12dfa6e7112dbbf7faa8cf41185 |
Hashes for guppy3-3.0.10-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b6079510434bf273c05f51c696c69388bd0f81d3d597490288bccd3b2991ead |
|
MD5 | 978e3e98e053eba27195ae4bf14cb481 |
|
BLAKE2b-256 | f5d2386a23a79cc3e396248bf849569875f29bea7b1df1b082b9b5c5629852cb |
Hashes for guppy3-3.0.10-cp38-cp38-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6541b8dfd925dfd13e440be7dc4c279a8f3b8f48ac9c7b285dadb86b21c277d0 |
|
MD5 | a0948dc138cbf5ad3dca8f0ea926a86b |
|
BLAKE2b-256 | 45c8b3c1d57537dd2d23187e1e95cca161ddb751f5b6ff69f4344cb485b76892 |
Hashes for guppy3-3.0.10-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 671833e997a894f441f9f0617beacc2ceda8d8be14cb410baca77d8aa65cae10 |
|
MD5 | 6359915d5f67862e2d075e54efe4aa86 |
|
BLAKE2b-256 | 8838669aec8755810bbf8e3b6b56882a321e278fede67237f37a15a20d62d36b |
Hashes for guppy3-3.0.10-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f07f2a93092cc0538251a53f22f5c8af0acfbb4f0bd48f8a71f7dd9f7bd3e987 |
|
MD5 | 069c295bb5f54e8ba3fe3d3198d514de |
|
BLAKE2b-256 | bae039e3c47e6fffb9b1fec5dcb62aa50731c6e08d07e5f180c2e1ba3df69fbf |
Hashes for guppy3-3.0.10-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e615b522a210d50dd460caed5aa08b234bfb868d1305d73b3f71911ff49cb526 |
|
MD5 | 5d66dda11d84da273a466cef87af6d8a |
|
BLAKE2b-256 | 75c3e7a8295dbf8c4192af72234e9b11ad745799fad916a142e8853fb20e6ed4 |
Hashes for guppy3-3.0.10-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4850bd199675d6c05a5829febb5274c432af126778049d7cd73e99a4a271e265 |
|
MD5 | 191fc0b430788fa920bd2bc73d7c49cb |
|
BLAKE2b-256 | 274dc7bb73d00e73adfc47d39fe4d3fdeeed1bc8b6e348ba92aba07db1e3bd45 |
Hashes for guppy3-3.0.10-cp37-cp37m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6387e50eab19ed2cab64b8e6f89a0bb9cf1ae5525f937d2abdc41c059751446f |
|
MD5 | 8cc322c17d0b92018ea18d8ab63165c5 |
|
BLAKE2b-256 | 1053567e29cf86c5ea04da0947ae7fc066cf30bc9a090272c828573e03a0b79e |
Hashes for guppy3-3.0.10-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50948c65d18c13bff5f2b83be34ae5df21bb2feae2d77c39b0f84fc236c5383c |
|
MD5 | b503810bef218709476cb2fb5416fb30 |
|
BLAKE2b-256 | dce0a35fe426c5f290dbf1f4d26c9cac71d5a2f5689cac05699e09f299cf7168 |
Hashes for guppy3-3.0.10-cp37-cp37m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a73bf46d5fe12d5b9038ff8a20dfd9ca8d8cc4a97798e86fa64da6a8be5ec324 |
|
MD5 | 525a4377000d775958aec9b368175d23 |
|
BLAKE2b-256 | dd015c251b6ec2ba616091ea2b56a379ed6749c8dc1a3eef7677106f1a115578 |
Hashes for guppy3-3.0.10-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e4120d6695c0828cf0884b9ef657727f4ec60db5a32b513416a0053194035cb |
|
MD5 | 5ac7fc4f45b6d34063a5622acc5ed661 |
|
BLAKE2b-256 | cc8f462ea97b4deab496f0046c570c2db771368f2de3360dbe78c0113c3a9966 |
Hashes for guppy3-3.0.10-cp36-cp36m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b16aca59f21719cbfaf2fc85685a928f3f492e905f538cc21d5afa6889bca18 |
|
MD5 | af23b95a1ec56c6127154764f691c45c |
|
BLAKE2b-256 | ab60e740a3e1dbe02d6fb012cbad342e56e1bba88949efcc7ef3aaed97f1cc87 |
Hashes for guppy3-3.0.10-cp36-cp36m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 20ee94a712d270a6ec47cc51aaa9b863f2b4496cbe7fea9714d74858aa211306 |
|
MD5 | c343447a539ff1ea2e9377bf52657a83 |
|
BLAKE2b-256 | bfdb7212f32f5d60e5c357b3e7ee16c0b92fc0fd75f4533726bfdef2e00616b2 |
Hashes for guppy3-3.0.10-cp36-cp36m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 36571b44ff77f0a152bd303041c3002ed9cb3ab9cd73a9aee01368ab4e7a00a5 |
|
MD5 | e47e3db87902486b457771e344f64279 |
|
BLAKE2b-256 | e217ba8c7168153721e5d9af87ffac312d6eb52c02d39e861f1055d6dba479c8 |
Hashes for guppy3-3.0.10-cp36-cp36m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | b1d26a26e25ab59643542ead2f761b47f654f41a368ed5050c17b993bf2a04d8 |
|
MD5 | 3db2965f12e16318090dbddf8fe61816 |
|
BLAKE2b-256 | 563699ef2002a050e601bfacd2c7f83bb1c83147790aa902f9efb782702c77d2 |
Hashes for guppy3-3.0.10-cp36-cp36m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2386a5f69cb28b32df493183f9715af15a4d22558acd7d199ba87a4bb425b6b5 |
|
MD5 | bd0f54daf9303932a9643cd4d04f59d0 |
|
BLAKE2b-256 | df5c6f7fc758ba1a8f784864e903b82887b1096731aa8cbf802c8e9fd8a679e2 |
Hashes for guppy3-3.0.10-cp36-cp36m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a1938a073120b3ead7db1f2f9b0b2f5b9b05b89daf3f05c41a57df505be3e08c |
|
MD5 | 8cf246bde50549c11a230188c794e21c |
|
BLAKE2b-256 | cce8a5d8ee1d48e0f99600df50127d08979d75cba9c0b22e8847f316eb74b9d2 |
Hashes for guppy3-3.0.10-cp36-cp36m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dca88224d31a3a458023e8bbbff5ce93e5bcff8e1a7dfb00aa6dd708f4376230 |
|
MD5 | d2d119469ba91f8f5701f84a03fba9ce |
|
BLAKE2b-256 | 49bca0b5ddfdcd7c38ba2d5543a092dbccf5e7f213da719eb7dd22d8bd3a1262 |
Hashes for guppy3-3.0.10-cp35-cp35m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ac9f70f321ca8bdc399a0453283e58f09d7fdeb498d92acdd05ed6395a65492 |
|
MD5 | 9ecf1273298acc04a96e7bd86b82e55c |
|
BLAKE2b-256 | 56833f4b0f3ce2846ada1b739d6efa28255f60b939122e2ba85dc9220441e043 |
Hashes for guppy3-3.0.10-cp35-cp35m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bda96db85ff50ad96fc027ae7784fac2a63cdefd6eec36f7177db39c0c232d7e |
|
MD5 | 51253334504a5fc5ccb0b95f06ff24dd |
|
BLAKE2b-256 | aa032cfb17095a547bf3d09dbd18ce725d18ea8235f05e1b13004f4c721d5947 |
Hashes for guppy3-3.0.10-cp35-cp35m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16bc2aafecb745cc91633eb53229fc4cc3698c93936124e3fe937dc6d63cb651 |
|
MD5 | a21230a7975cc9cf76e9f956d0b34f6f |
|
BLAKE2b-256 | 064ea3a083b31d97ef2866f0a7b3e2ca5b158aaf12ecbc96d0be320a4c846060 |
Hashes for guppy3-3.0.10-cp35-cp35m-manylinux2010_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 465155eb80d97123df30066e666cc2d49ee745e16f653f215000ff247a4fdb9d |
|
MD5 | f56ae2678162487b7c9f6ea0201ade27 |
|
BLAKE2b-256 | 6e05eab497a64c31f451307c8cb51326ddf0dc10ed325e5dac997f4657a5331d |
Hashes for guppy3-3.0.10-cp35-cp35m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6b512759d01b3af28bb14c64861afd95e2b1cf4e4e1dd7f84fd4c7b2750d9691 |
|
MD5 | 5bac8df81b193cde784762267a471e53 |
|
BLAKE2b-256 | 89197e72bbb98bf59fed8051a8b2c7aa2296af7099d39f12f4704373deae02db |
Hashes for guppy3-3.0.10-cp35-cp35m-manylinux1_i686.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2cd556f1eea25edd5166e91a8a9f65e3f6c2369f21b13fe5f356001bb42cb294 |
|
MD5 | 8e388da4087611c5eaebfd6e5453dd98 |
|
BLAKE2b-256 | b70a32b38dba84808c1a20a5d5e74229fc0ce93279dcfc70609bad33b32a7f88 |
Hashes for guppy3-3.0.10-cp35-cp35m-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 73103b58ff0523086f0c68d61f9a55dc7f99ac22acce85912ad4de3a16bbd2cf |
|
MD5 | a355f7bef3f56f4130e9588044fcc729 |
|
BLAKE2b-256 | c2a9514913cd0bf1cd1c5188755c8e10087a635a6199d0197b25d72b005eb096 |