Metadata-Version: 2.0
Name: gbn
Version: 0.4.2
Summary: Greenlet BottleNeck profiler.
Home-page: https://github.com/denis-ryzhkov/gbn
Author: Denis Ryzhkov
Author-email: denisr@denisr.com
License: MIT
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
Requires-Dist: greenlet

Greenlet BottleNeck profiler.

Measures time precisely using "greenlet.settrace" to pause/continue counting time on switch from/to original greenlet.

May count wall-clock time too. Also counts step calls and context switches.

Usage::

    gbn_attach()

    gbn('step1')
    step1()

    gbn('step2')
    step2()

    wall = gbn('step3')
    step3()

    wall = gbn('step4', wall=wall)
    step4()

    gbn('step5', wall=wall)
    step5()

    gbn()
    does_not_count_this()

    log.info(gbn_report_and_reset())
    # OR
    spawn(gbn_report_and_reset, each=60, log=log.info)



