Skip to main content

Python profiling tool

Project description

Installing

pip install pprof

or

poetry add pprof

A Simple Example

from typing import List
from pprof import cpu

cpu.auto_report()

@cpu
def run(arr: List) -> float:
    tmp = []
    for row in arr:
        if row % 3 == 0:
            tmp.append(row)
    result = (sum(tmp*100) + len(arr)) / len(tmp)
    return result

run(list(range(100000)))
(venv) python run.py

Links

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

pprof-0.1.0.tar.gz (2.7 kB view hashes)

Uploaded Source

Built Distribution

pprof-0.1.0-py3-none-any.whl (2.7 kB view hashes)

Uploaded Python 3

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