https://github.com/mirecl/pprof
Python profiling tool
https://github.com/mirecl/pprof
perfomance profiling profiling-library pypi python python3
Last synced: about 1 year ago
JSON representation
Python profiling tool
- Host: GitHub
- URL: https://github.com/mirecl/pprof
- Owner: mirecl
- License: mit
- Created: 2022-03-24T13:05:50.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2025-01-28T11:14:37.000Z (over 1 year ago)
- Last Synced: 2025-03-23T19:51:31.711Z (over 1 year ago)
- Topics: perfomance, profiling, profiling-library, pypi, python, python3
- Language: Python
- Homepage: https://pypi.org/project/pprof
- Size: 682 KB
- Stars: 15
- Watchers: 2
- Forks: 0
- Open Issues: 16
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
---
## Installing
```sh
pip install pprof
```
or
```sh
poetry add pprof
```
## A Simple Example
```python
from time import sleep
from typing import List
from pprof import cpu
cpu.auto_report()
def foo():
sleep(1.01)
return 3
@cpu
def run(arr: List) -> float:
tmp = []
cnt = foo()
# comment action #1
for row in arr:
# comment action #2 row 1
# comment action #2 row 2
if row % cnt == 0:
tmp.append(row)
result = (sum(tmp * 200) + len(arr)) / len(tmp) # comment action #3
return result
run(list(range(250000)))
```
```sh
(venv) python run.py
```
## Links
+ **line_profiler** ()
