Skip to main content
Join the official 2020 Python Developers SurveyStart the survey!

Greenlet BottleNeck profiler.

Project description

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)

See help(gbn) for detailed docs.

Additional tools:

  • gxray - Heavy profiler when you don’t know where to profile.
  • gswitched - Checks if greenlet switched.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for gbn, version 0.4.3
Filename, size File type Python version Upload date Hashes
Filename, size gbn-0.4.3-py2-none-any.whl (5.1 kB) File type Wheel Python version py2 Upload date Hashes View
Filename, size gbn-0.4.3.tar.gz (3.3 kB) File type Source Python version None Upload date Hashes View

Supported by

Pingdom Pingdom Monitoring Google Google Object Storage and Download Analytics Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page