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 Distributions
No source distribution files available for this release.See tutorial on generating distribution archives.
Built Distributions
py_pal-0.1.5-cp38-cp38-win_amd64.whl
(121.8 kB
view hashes)
py_pal-0.1.5-cp38-cp38-win32.whl
(115.4 kB
view hashes)
py_pal-0.1.5-cp37-cp37m-win_amd64.whl
(120.8 kB
view hashes)
py_pal-0.1.5-cp37-cp37m-win32.whl
(114.6 kB
view hashes)
Close
Hashes for py_pal-0.1.5-cp38-cp38-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ffa0492fec1b7afad0e1d48447bcd9d3133f8e9557c2cea296d86524e64610b |
|
MD5 | 0f5660eca41cfd30d422e7f7b6245e41 |
|
BLAKE2b-256 | 1b64716b3d95bfe77c9ee7b643b8c19fb04604b4f5dab2a8ab21735319e76ecd |
Close
Hashes for py_pal-0.1.5-cp38-cp38-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bfeee3741b855fe10bef391324477225409deb6b954448f6edf8917cca5b94c |
|
MD5 | 08109fd6a80057a232e15eba2dd4a630 |
|
BLAKE2b-256 | 55fb02aad0aa64a69f3ba7948ad02f5376fc2ee9b6522c7ac5eea3fc1ee414fc |
Close
Hashes for py_pal-0.1.5-cp37-cp37m-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 46dae5e7ddd3e6578f69688a29562bed55cd24e4639848d4081661eaf16ec460 |
|
MD5 | 0f0b7df7d4b008ebe32d7cad07075577 |
|
BLAKE2b-256 | 8599fc504290afe27291c8dfb28c58fbbb5e67d9fb1f848fc8da2be583f7888d |
Close
Hashes for py_pal-0.1.5-cp37-cp37m-win32.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bb9e694a326446153688c0bf9346170cbaa8ea2ff8e5f2df735c5bcfb81fd57 |
|
MD5 | e66feded1dd4e4454e9dce80c0f1a7aa |
|
BLAKE2b-256 | 6694eb2475bf26d7eedefcc3e3ae15543e3d741559ba38ac21231c50d8188666 |