pyprofiler
Profiler utility for python
install
pip install pyprofiler
profile code in source
profiler = start_profile()
meth1()
meth2()
meth3()
meth4()
end_profile(profiler)
# sample
python run_graph_main.py
$ total time
42 function calls (39 primitive calls) in 2.018 seconds
Ordered by: internal time
List reduced from 22 to 20 due to restriction <20>
ncalls tottime percall cumtime percall filename:lineno(function)
8 2.016 0.252 2.016 0.252 {time.sleep}
1 0.001 0.001 0.002 0.002 pyprofiler.py:16(end_profile)
1 0.000 0.000 0.000 0.000 functools.py:2(<module>)
1 0.000 0.000 0.001 0.001 pstats.py:1(<module>)
2 0.000 0.000 0.504 0.252 main_profile.py:32(meth2)
2 0.000 0.000 0.205 0.103 main_profile.py:22(meth1)
2 0.000 0.000 0.908 0.454 main_profile.py:42(meth3)
8/5 0.000 0.000 0.604 0.121 main_profile.py:10(call_next)
2 0.000 0.000 1.406 0.703 main_profile.py:52(meth4)
1 0.000 0.000 1.006 1.006 main_profile.py:62(aggregate)
graphical representation, needs and graphviz
# requirements
pip install gprof2dot
brew install graphviz
# sample program
python main_graph.py
from pyprofiler import graph_profile_program
graph_profile_program("main_graph.py")
screenshot
callgraph, needs wxpython and runsnakerun
# requirements
brew install wxPython
pip install runsnakerun
# sample
python run_graph_main.py
#implementation, call method aggregate
runsnake_profile_method("aggregate", globals(), locals())
screenshot
Metadata
Release files for pyprofiler 2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pyprofiler-2.tar.gz | 2.4 kB | Without provenance | Details for pyprofiler-2.tar.gz |
Release files / pyprofiler-2.tar.gz
| Download URL | pyprofiler-2.tar.gz |
|---|---|
| Size | 2.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
95466d524a4580f3f227b55f9bd91af9dd08868db8cc3ac092faa4d540739c0b
|
|
BLAKE2b-256 checksum How to use checksums |
88593e7739acec7c3585b058fe2a8b25f50407034c5ab1999c7a125b2f48add2
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for pyprofiler 2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.