Skip to main content

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.

Release files for gbn 0.4.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for gbn 0.4.3
File Size Uploaded
gbn-0.4.3.tar.gz 3.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for gbn 0.4.3
File Interpreter ABI Platform
gbn-0.4.3-py2-none-any.whl Python 2 none any Details

Total release size: 8.4 kB

Release files / gbn-0.4.3.tar.gz

Download URL gbn-0.4.3.tar.gz
Size 3.3 kB
Tags Source
SHA-256 checksum
How to use checksums
ee78f2a0611b414d17a87009855613929d7dc694a8de0741cb6b5ee965dcfd34
BLAKE2b-256 checksum
How to use checksums
a70d883df1890aa68a3ad5b9a6272716c8df03a8fb3b16124203096cf40822ec
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release files / gbn-0.4.3-py2-none-any.whl

Download URL gbn-0.4.3-py2-none-any.whl
Size 5.1 kB
Tags Python 2
SHA-256 checksum
How to use checksums
f5894f6caf0dbd128965869d6a021e1138b38d1be6083a759f96e18d2855e4f4
BLAKE2b-256 checksum
How to use checksums
cbd2c809a14dbdc420ca7b2ad0bac4d5f55e9dccf4db3af0626a2af1eea147f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No

Release history Release notifications | RSS feed

This release

0.4.3 This release

2 release files

0.4.2

2 release files

0.4.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page