Skip to main content

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.

Filename, size & hash SHA256 hash help File type Python version Upload date
gbn-0.4.3-py2-none-any.whl (5.1 kB) Copy SHA256 hash SHA256 Wheel py2
gbn-0.4.3.tar.gz (3.3 kB) Copy SHA256 hash SHA256 Source None

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page