Stackdriver Profiler Python Agent
Project description
Stackdriver Python profiling agent
Python profiling agent for Stackdriver Profiler.
Installation & usage
-
Install the profiler package using PyPI:
pip3 install google-cloud-profiler
-
Enable the profiler in your application:
import googlecloudprofiler def main(): # Profiler initialization. It starts a daemon thread which continuously # collects and uploads profiles. Best done as early as possible. try: googlecloudprofiler.start( service='hello-profiler', service_version='1.0.1', # verbose is the logging level. 0-error, 1-warning, 2-info, # 3-debug. It defaults to 0 (error) if not set. verbose=3, # project_id must be set if not running on GCP. # project_id='my-project-id', ) except (ValueError, NotImplementedError) as exc: print(exc) # Handle errors here
See Stackdriver Profiler profiling Python code for detailed documentation.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Close
Hashes for google-cloud-profiler-1.0.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 491269285a849d1e3e36c8a9fa7c2ef289b0a9863328f9a85c86f7e58ae1a80a |
|
MD5 | 62dc7bb3834ad28b8945783f1d1a3f9c |
|
BLAKE2b-256 | 704ef16570006f67c30209e480bc178d7775a1e3a76f3f530840c3b2e2e9be4e |