{"categories":[{"label":"Monitoring","url":"https://skillfed.io/packages/category/system-monitoring/2"}],"enrichment":{"capability":"Measures GIL contention within a specific code block by spawning a monitoring thread that periodically attempts to re-acquire the GIL and records acquisition latency as a contention metric.","skillfed_tags":["gil-profiling","performance-analysis","concurrency-debugging"],"use_cases":["Identify whether a slow code section is GIL-bound or CPU-bound by measuring contention during execution.","Quick profiling of multi-threaded Python code to spot lock contention without running a full external profiler.","Benchmark the impact of GIL-heavy operations on concurrent workloads by sampling contention before and after code changes.","Monitor GIL contention in production or test environments with minimal overhead by tuning polling intervals.","Validate that async or C-extension refactoring actually reduced GIL pressure in a specific code path."],"what_it_does":"GIL Knocker is a lightweight, quick-and-dirty GIL contention profiler for Python. It works by spawning a background thread that repeatedly tries to acquire the GIL at configurable intervals and measures how long each acquisition takes; longer acquisition times indicate higher contention. The contention metric is a float between 0 and 1 representing roughly how busy the GIL was during the sampling window.\n\nThe package is designed for developers who want to quickly check GIL contention within a specific code section without the overhead of a full profiler like py-spy. It exposes three tunable parameters\u2014polling_interval_micros, sampling_interval_micros, and sleeping_interval_micros\u2014to trade off accuracy against performance impact. The monitoring thread runs in the background and can be started, stopped, and queried for the current contention metric; the metric persists after stop() is called.","worth_installing":"Yes, if you need a lightweight, inline GIL contention check for a specific code block and are willing to verify the license. The package has no runtime dependencies, installs cleanly on common platforms, and aligns with py-spy's measurements. However, verify the license status before use in proprietary projects, and be aware that the project is aging (300 days since last release) with modest maintenance activity."},"id":"gilknocker","links":{"html":"https://skillfed.io/packages/gilknocker","md":"https://skillfed.io/packages/gilknocker.md","pypi":"https://pypi.org/project/gilknocker/"},"maintenance":{"status":"aging"},"meta":{"latest_release":"2025-10-18","license_spdx":null,"license_treatment":"unclear","name":"gilknocker","python_support":"supports_current","summary":null},"popularity":{"monthly_downloads":1286534,"position":4110,"tier":"top_5000"},"security":{"n_vulnerabilities":0},"version":"0.4.2"}
