Module Expr Str ImportFrom alias ImportFrom alias ImportFrom alias ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr BinOpMult Num Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr BinOpMult Call NameLoad Num Num Str decorator_list decorator_list ClassDef bases NameLoad body FunctionDef arguments args NameParam defaults body Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad Num Assign AttributeStore NameLoad attr Call NameLoad Call NameLoad Num decorator_list decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults Num Num body Assign NameStore ListLoad For NameStore Call NameLoad NameLoad body For NameStore Call NameLoad NameLoad body Expr Call AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Call NameLoad Expr Call AttributeLoad NameLoad attr Return NameLoad decorator_list Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad keyword Num Print Str Expr Call AttributeLoad NameLoad attr Assign NameStore Call NameLoad NameLoad Print Str Delete NameDel Expr Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr keyword NameLoad keyword AttributeLoad NameLoad attr
N/A N/A 
This example shows how to track classes and display statistics at the end of
the script using the web GUI. Snapshots are taken manually. This setup makes
sense with simple batch processing jobs where you want to track memory usage at
certain points in time.
 random randint pympler web pympler.classtracker ClassTracker Alpha N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self data N/A 100 0xdeadbeef N/A N/A Beta N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self data N/A N/A randint 200 300 0xdeadbeef N/A N/A Gamma N/A object N/A __init__ N/A N/A self N/A N/A N/A N/A self mutable N/A list N/A range 10 N/A N/A self immutable N/A tuple N/A range 10 N/A N/A create_data N/A N/A tracker iterations obj_per_iteration N/A 20 100 N/A N/A objects N/A N/A x N/A range iterations N/A N/A y N/A range obj_per_iteration N/A N/A N/A N/A objects append N/A Alpha N/A N/A N/A objects append N/A Beta N/A N/A N/A objects append N/A Gamma N/A N/A N/A tracker create_snapshot N/A objects N/A N/A tracker N/A ClassTracker N/A N/A N/A tracker track_class Alpha N/A N/A N/A tracker track_class Beta N/A N/A N/A tracker track_class Gamma trace True resolution_level 2 N/A Create data N/A N/A N/A tracker create_snapshot N/A data N/A create_data tracker N/A Drop data N/A data N/A N/A N/A tracker create_snapshot N/A N/A N/A web start_profiler debug True stats N/A tracker stats