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
- line_profiler (https://github.com/pyutils/line_profiler)
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 details)
Built Distribution
pprof-0.1.0-py3-none-any.whl
(2.7 kB
view details)
File details
Details for the file pprof-0.1.0.tar.gz
.
File metadata
- Download URL: pprof-0.1.0.tar.gz
- Upload date:
- Size: 2.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.6.12 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8ae5682f430dc090c4350372b8c1b3cf123407946e79bfdc5f4309c7ff8b2566 |
|
MD5 | ef42f106b39b8987210141e3cb572aa6 |
|
BLAKE2b-256 | 586ed16fd6cab4495ef9cc148253afc58da669aadaaf6e454c6218a8fbb8ac9a |
File details
Details for the file pprof-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: pprof-0.1.0-py3-none-any.whl
- Upload date:
- Size: 2.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.13 CPython/3.6.12 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3fda57518f98c3af54a7b432287ce6ed1d2ed179c1ab44f2a537bd6590a4240a |
|
MD5 | b79837e5d67b537cec0eaa7f2e44c218 |
|
BLAKE2b-256 | 6e424cf69510984c192eeca387f904ebe8e14a4841fb969fc81d3cdb604c65be |