Skip to main content

Peasy Profiller

This is a simple and easy-to-use profiller for Python applications that will generate CSV files that indicate the amount of time your application spent in different contexts

Quickstart

To install, run

pip install --upgrade pip
pip install peasyprofiller

To use it in a program, import it, call the start function at the start of the section you want to profile and stop at the end of that section. Time of sections with the same context will be added.

To save the data collected, call the save_csv function with the desired save path. You can also call the plot function to create a graph of the relative time spent in each section (this assumes that all tracked sections are disjointed in time)

from peasyprofiller.profiller import profiller as pprof

pprof.start("Name of my activity")

# Some processing happens here

pprof.stop("Name of my activity")
pprof.save_csv("path/to/save")
pprof.plot("path/to/save")

Example

You can run the example at peasyprofiller/tests/fibonacci.py with the following command:

python -m peasyprofiller.tests.fibonacci <N> <SAVE_PATH>

The generated CSV should look like this:

Profiller,Fibonacci
6.87e-05,6.7745289

Metadata

Release files for peasyprofiller 0.5.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for peasyprofiller 0.5.0
File Size Uploaded
peasyprofiller-0.5.0.tar.gz 4.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for peasyprofiller 0.5.0
File Interpreter ABI Platform
peasyprofiller-0.5.0-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 22.5 kB

Release files / peasyprofiller-0.5.0.tar.gz

Download URL peasyprofiller-0.5.0.tar.gz
Size 4.0 kB
Tags Source
SHA-256 checksum
How to use checksums
f9490665e29fb861af08c2f632a0acb3d5e76fc7023668de1150712c5f6f3a52
BLAKE2b-256 checksum
How to use checksums
43abf086eff20384b9a0071be0abeb52475cd4612fdb9348234bb575cab446d8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release files / peasyprofiller-0.5.0-py2.py3-none-any.whl

Download URL peasyprofiller-0.5.0-py2.py3-none-any.whl
Size 18.5 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
0d2e8c68f41940cb0d30461b9fa7cd42891812c8bff9bdaa31304c442dbee839
BLAKE2b-256 checksum
How to use checksums
a7c057b15e1a9481a00c010cda6e22bd49b007a78269dd696f971c6c19f79fc3
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.10.12

Release history Release notifications | RSS feed

This release

0.5.0 This release

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page