Skip to main content

Statistical CPU and wall-clock profilers for Python

Project description


Statistical (sampling) CPU and wall-clock profilers for Python, derived from google-cloud-profiler.

Google Cloud Python profiling agent

Python profiling agent for Google Cloud Profiler.

See Google Cloud Profiler profiling Python code for detailed documentation.

Supported OS

Linux. Profiling Python applications is supported for Linux kernels whose standard C library is implemented with glibc or with musl. For configuration information specific to Linux Alpine kernels, see Running on Linux Alpine.

Supported Python Versions

Python >= 3.7 and <= 3.11

Installation & usage

  1. Install the profiler package using PyPI:

    pip3 install zprofile
  2. Enable the profiler in your application:

    from zprofile.cpu_profiler import CPUProfiler
    p = CPUProfiler()
    pprof = p.profile(30)  # seconds
    with open("profile.pprof", "wb") as f:
  3. View the profile with the pprof tool:

    $ go tool pprof -http localhost:8080 profile.pprof

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zprofile-1.0.13.tar.gz (28.7 kB view hashes)

Uploaded Source

Built Distributions

zprofile-1.0.13-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (751.5 kB view hashes)

Uploaded CPython 3.12 manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (750.3 kB view hashes)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (748.4 kB view hashes)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.7 kB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (747.8 kB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (749.9 kB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

zprofile-1.0.13-cp36-cp36m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (746.9 kB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.17+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page