Metadata-Version: 1.1
Name: mem_top
Version: 0.1.0
Summary: Shows top suspects for memory leaks in your Python program.
Home-page: https://github.com/denis-ryzhkov/mem_top
Author: Denis Ryzhkov
Author-email: denisr@denisr.com
License: MIT
Description: 
        Usage::
        
            pip install mem_top
            from mem_top import mem_top
        
            # From time to time:
            logging.debug(mem_top()) # Or just print().
        
        Result::
        
            refs:
            144997  <type 'collections.defaultdict'> defaultdict(<type 'collections.deque'>, {<GearmanJobRequest task='...', unique='.
            144996  <type 'dict'> {'.:..............:.......': <GearmanJobRequest task='..................', unique='.................
            18948   <type 'dict'> {...
            1578    <type 'dict'> {...
            968     <type 'dict'> {...
            968     <type 'dict'> {...
            968     <type 'dict'> {...
            767     <type 'list'> [...
            726     <type 'dict'> {...
            608     <type 'dict'> {...
        
            types:
            292499  <type 'dict'>
            217912  <type 'collections.deque'>
            72702   <class 'gearman.job.GearmanJob'>
            72702   <class 'gearman.job.GearmanJobRequest'>
            12340   <type '...
            3103    <type '...
            1112    <type '...
            855     <type '...
            767     <type '...
            532     <type '...
        
        Explaining result:
        
        * It is absolutely clear who is leaking here, it is Python client of Gearman.
        * Found its known bug - leaking defaultdict of deques, and a dict of GearmanJobRequest-s: https://github.com/Yelp/python-gearman/issues/10
        * Found this bug is already fixed, but PyPI at https://pypi.python.org/pypi/gearman still has an old broken code.
        * Replaced "pip install gearman" with "pip install git+https://github.com/Yelp/python-gearman.git".
        * Repeated "mem_top" test, and confirmed the leak is completely closed.
        
        Config defaults::
        
            mem_top(limit=10, width=100, sep='\n', refs_format='{num}\t{type} {obj}', types_format='{num}\t {obj}')
        
        
Platform: UNKNOWN
Classifier: Development Status :: 4 - Beta
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Software Development :: Libraries :: Python Modules
