Blackfire Continuous Profiler
Project description
Blackfire Continuous Profiler for Python
Blackfire Continuous Profiler continuously collects and uploads profiling data to the Blackfire servers. Once enabled, the profiler collects the relevant profiling information in configurable intervals and periodically uploads it to the Blackfire Agent. Blackfire Agent then forwards this information to the backend.
How to use
Prerequisites
- Python >= 3.7.0
- Blackfire Agent >= 2.13.0
Installation
pip install blackfire_conprof
Example
An example using the whole API interface:
- Install dependencies
pip install blackfire_conprof
- Create
example.py
with the following code
from blackfire_conprof.profiler import Profiler
def foo():
import time
time.sleep(1.0)
profiler = Profiler(application_name="my-python-app", agent_socket="tcp://127.0.0.1:8307", labels={'my-extra-label': 'data'})
profiler.start()
foo()
profiler.stop()
- Run Blackfire Agent (version 2.13.0 and up)
BLACKFIRE_SOCKET="tcp://127.0.0.1:8307" blackfire agent --log-level=4
- Run the example application. (
python example.py
) - Profiler will send data to the Agent, and Agent will forward it to the Blackfire backend. Data then can be visualized at https://blackfire.io
Contributing
Use make help
to display an overview of useful commands for your dev environment.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distribution
File details
Details for the file blackfire_conprof-1.0.0-py3-none-any.whl
.
File metadata
- Download URL: blackfire_conprof-1.0.0-py3-none-any.whl
- Upload date:
- Size: 4.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/1.15.0 pkginfo/1.9.6 requests/2.31.0 setuptools/45.2.0 requests-toolbelt/1.0.0 tqdm/4.66.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 54fcda93ca35d29d8807d41c02da076f07661f81dfa0bb90097887042c30675b |
|
MD5 | 1547d96e8b12f537767e9ea511886c48 |
|
BLAKE2b-256 | 4aa57916500bf85cd59f43a2ad926d083aff29eb78fa654f5371036853648f08 |