Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

Statistical CPU and wall-clock profilers for Python

Project description

zprofile

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

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:
      f.write(pprof)
    
  3. View the profile with the pprof tool:

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

Project details


Release history Release notifications

Download files

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

Files for zprofile, version 1.0.11
Filename, size File type Python version Upload date Hashes
Filename, size zprofile-1.0.11-cp27-cp27m-macosx_10_15_x86_64.whl (31.2 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp27-cp27m-manylinux1_i686.whl (479.3 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp27-cp27m-manylinux1_x86_64.whl (464.9 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp27-cp27mu-manylinux1_i686.whl (479.3 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp27-cp27mu-manylinux1_x86_64.whl (464.9 kB) File type Wheel Python version cp27 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp34-cp34m-manylinux1_i686.whl (478.8 kB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp34-cp34m-manylinux1_x86_64.whl (464.4 kB) File type Wheel Python version cp34 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp35-cp35m-manylinux1_i686.whl (479.4 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp35-cp35m-manylinux1_x86_64.whl (464.9 kB) File type Wheel Python version cp35 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp36-cp36m-manylinux1_i686.whl (479.7 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp36-cp36m-manylinux1_x86_64.whl (465.5 kB) File type Wheel Python version cp36 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp37-cp37m-macosx_10_14_x86_64.whl (32.2 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp37-cp37m-manylinux1_i686.whl (481.1 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size zprofile-1.0.11-cp37-cp37m-manylinux1_x86_64.whl (467.6 kB) File type Wheel Python version cp37 Upload date Hashes View hashes
Filename, size zprofile-1.0.11.tar.gz (26.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page