Metadata-Version: 1.0
Name: iscool_e.pynba
Version: 0.3.4
Summary: This is a wsgi middleware to monitor performance in production systems
Home-page: https://github.com/IsCoolEntertainment/pynba
Author: Xavier Barbosa
Author-email: xavier.barbosa@iscool-e.com
License: MIT
Description: IsCool Entertainment Pynba
        ==========================
        
        Pynba is a WSGI Middleware for Pinba_. It allows realtime monitoring/statistics
        server using MySQL as a read-only interface.
        
        It accumulates and processes data sent over UDP by multiple Python processes
        and displays statistics in a nice human-readable form of simple "reports", also
        providing read-only interface to the raw data in order to make possible
        generation of more sophisticated reports and stats.
        
        Users also can measure particular parts of the code using timers with arbitrary
        tags.
        
        
        Why another statistics manager ?
        --------------------------------
        
        Because Pinba rocks!
        
        At `IsCool Entertainment`_, we already use Pinba for monitoring our PHP based
        applications.
        
        
        Requirements
        ------------
        
        This library relies on Pinba_ and Protobuf_,
        and Werkzeug_ before the version 0.3.
        You will need to install theses packages before using Pynba.
        
        The installation process requires setuptools to be installed.
        If it is not, please refer to the installation of this package.
        
        
        Setup
        -----
        
        If you want to install the official release, do::
        
            $ pip install iscool_e.pynba
        
        But i you prefer to use the current developement version, do::
        
            $ git clone https://github.com/IsCoolEntertainment/pynba.git
            $ python setup.py install
        
        
        Usage
        -----
        
        Says that your main WSGI application is::
        
            def app(environ, start_response):
                ...
        
        Import the pynba decorator, and decorate your main app with it::
        
            from iscool_e.pynba import monitor
        
            @monitor(('127.0.0.1', 30002))
            def app(environ, start_response):
                ...
        
        Each time the app will be processed, a new UPD stream will be sent.
        
        Eventualy, you can use timers to measure particular parts of your code.
        For it, just import the pynba proxy, and use it to create new timers::
        
            from iscool_e.pynba import pynba
        
            timer = pynba.timer(foo="bar")
            timer.start()
            ...
            timer.stop()
        
        But you may want to supervise simple scripts. For this usage, use ``ScriptMonitor``::
        
            from iscool_e.pynba.util import ScriptMonitor
        
            monitor = ScriptMonitor(('127.0.0.1', 30002))
            timer = monitor.timer(foo='bar')
            timer.start()
            ...
            timer.stop()
            monitor.send()
        
        
        Some use cases are available on src/examples/
        
        
        Differences with PHP extension
        ------------------------------
        
        About the data sent:
        
        *   ``ru_utime`` and ``ru_stime`` represent the resource usage for the current
            process, not the shared resources.
        *   ``document_size`` cannot be automaticaly processed with the current WSGI
            specification. You are able to set manually this value like this::
        
                pynba.document_size = [YOUR VALUE]
        
        *   ``memory_peak`` also is currently not implemented. Like the previous data,
            you can set manually this value like this::
        
                pynba.memory_peak = [YOUR VALUE]
        
        About timers:
        
        *   The Python version permites multiple values for each timer tags.
            Just declare any sequences, mapping or callable. This example::
        
                pynba.timer(foo='bar', baz=['seq1', 'seq2'], qux={'map1': 'val1'})
        
            Will populates 4 values for 3 tags in the Pinba database::
        
                ('foo', 'bar'),
                ('baz, 'seq1'),
                ('baz, 'seq2'),
                ('qux.map1', 'val1')
        
        Other additions:
        
        *   ``ScriptMonitor`` allows to monitor single scripts. At IsCool Entertainment, we use it for monitoring our AMQ based workers.
        
        
        License
        -------
        
        This package is release under the MIT Licence.
        Please see LICENSE document for a full description.
        
        
        Credits
        -------
        
        - Pinba_
        - Werkzeug_
        - Protobuf_
        
        .. _Pinba: http://pinba.org
        .. _Werkzeug: http://werkzeug.pocoo.org
        .. _Protobuf: http://code.google.com/p/protobuf/
        .. _`IsCool Entertainment`: http://www.iscoolentertainment.com/en/
        
        
        .. Please, see the README.rst for more details
        
        News
        ====
        
        0.1
        ---
        
        *Release date: 19-Jun-2012*
        
        * First release
        
        0.2
        ---
        
        *Release date: 29-Jun-2012*
        
        * Logging refactoring
        
        0.3
        ---
        
        *Release date: 26-Sept-2012*
        
        * Migrate to cython
        * Removed Werkzeug dependency
        
        0.3.2
        -----
        
        *Release date: 1-Oct-2012*
        
        * Fixed empty strings
        
        0.3.3
        -----
        
        *Release date: 29-Oct-2012*
        
        * Added util for scripts monitoring
Keywords: pinba wsgi monitoring
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Intended Audience :: Developers
Classifier: Intended Audience :: Information Technology
Classifier: Intended Audience :: System Administrators
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 2.6
Classifier: Programming Language :: Python :: 2.7
Classifier: Topic :: Internet :: Log Analysis
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content :: Page Counters
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI :: Middleware
Classifier: Topic :: Software Development :: Libraries
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Classifier: Topic :: System :: Monitoring
Classifier: Topic :: Utilities
