Estimate Asymptotic Runtime Complexity from Bytecode executions
Project description
Python Performance Analysis Library or py-pal is a bytecode profiling toolkit.
Installation
This project requires CPython to run. Install Python >= 3.7, then install py-pal by running:
pip install py-pal
Documentation
TBA
Overview
Calling py-pal as module with
python -m py_pal file.py
or
pypal file.py
Measure specific functions using the decorator:
from py_pal.core import profile
@profile
def test():
pass
Using the context manager:
from py_pal.tracer import Tracer
with Tracer() as t:
pass
Using the API:
from py_pal.estimator import ComplexityEstimator
from py_pal.tracer import Tracer
t = Tracer()
t.trace()
# Your function
pass
t.stop()
estimator = ComplexityEstimator(t)
res = estimator.export()
# Do something with the resulting DataFrame
print(res)
Modes
Profiling and Performance Testing
Tracing processes
Development
To run the all tests run:
pip install -r dev-requirements.txt pytest tests
FAQ
Why not use a standard profiler?
Using absolute timing data vs synthetic timing data using opcodes.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
py-pal-0.0.1.tar.gz
(78.5 kB
view hashes)
Built Distributions
Close
Hashes for py_pal-0.0.1-cp38-cp38-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5fea283bf0d12b42b75099912bc4eaca7631261f5278ca42bd80620f515b7d28 |
|
MD5 | 097d6cf43188e847503335164efe6c24 |
|
BLAKE2b-256 | ee3f6770b13343926dddfbca8e0a6b2f89c05ed3065982f2c90a83290bf10002 |
Close
Hashes for py_pal-0.0.1-cp38-cp38-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ac73b21b6f69507dc6051e7d4b922e0ed8ef255c8363b85399a35e6ad253f0f1 |
|
MD5 | 726ed4fb5001ff1f9163bfe000f6a04c |
|
BLAKE2b-256 | c87749c39b802aeabbc1bab0101627a52f0a524b5c490ae318f46b87b8194c25 |
Close
Hashes for py_pal-0.0.1-cp37-cp37m-manylinux2010_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 375a9d613b9321a9b6cdc2feff43f9d8982724e850440b9eb8e0e13283b0f6c3 |
|
MD5 | 5ebe74bc63f46280ec994e4a1a34b7dc |
|
BLAKE2b-256 | a28045173ff0954c66b8620f041398ed4e6b892ec60ad8a9fa12fc86c6343afe |
Close
Hashes for py_pal-0.0.1-cp37-cp37m-manylinux1_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0b8b9a45ff6dd735e228b61798674fbacb175c622e3e301f2fecabc1669930f5 |
|
MD5 | b84f52cff211e8780c2f46c4f0e1929f |
|
BLAKE2b-256 | 9b9dc2f436222216fd18a5b4c432b8d0d3ebfc69b58a6a99ce0d405d20652511 |