Python3 - Profiler Wrapper
This package provides a wrapper function for easier usage of the built-in profiler.
It only uses builtin modules.
Install
python3 -m pip install profiler-wrapper
See: PyPI
Usage
from profiler_wrapper import profile
def function_to_profile(switch: bool, data: dict, msg: str):
...
return {'data': 'test'}
profile(
target=function_to_profile,
args=[True],
kwargs={
'data': {'random': 'test'},
'msg': 'Yesterday is gone.'
},
lines=3,
)
# (
# {'data': 'test'},
#
# "270011472 function calls (270011215 primitive calls) in 181.830 seconds
# Ordered by: internal time
#
# ncalls tottime percall cumtime percall filename:lineno(function)
# 1 5.000 5.000 8.000 8.000 /tmp/test.py:95(function_to_profile)
# 2 2.000 2.000 3.000 3.000 /tmp/test.py:89(sub_function)
# 3 1.000 1.000 1.000 1.000 /tmp/test.py:89(sub_function2)
# "
# )
Metadata
Release files for profiler-wrapper 1.0.1
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 |
|---|---|---|---|---|
| profiler_wrapper-1.0.1.tar.gz | 13.8 kB | Without provenance | Details for profiler_wrapper-1.0.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| profiler_wrapper-1.0.1-py3-none-any.whl | Python 3 | none | any | Details for profiler_wrapper-1.0.1-py3-none-any.whl |
Total release size: 27.7 kB
Release files / profiler_wrapper-1.0.1.tar.gz
| Download URL | profiler_wrapper-1.0.1.tar.gz |
|---|---|
| Size | 13.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8904818e8e3abb46138b4cc079f73737640a208d924e52a0749810a0e34a0742
|
|
BLAKE2b-256 checksum How to use checksums |
6e8d9c19bfd059db248727b82f1d5c7a04f2f4f24d9baa22f4cf9717615957e4
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Release files / profiler_wrapper-1.0.1-py3-none-any.whl
| Download URL | profiler_wrapper-1.0.1-py3-none-any.whl |
|---|---|
| Size | 13.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8f7431f56ba512ce5f37272a2c652db2c5a6b23758de2111f04f1b821447e2e6
|
|
BLAKE2b-256 checksum How to use checksums |
509e18aa5383f0cc45034d90d34b9d61a5dae56ffbb3a07aa453543086673bcc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.10.6
|
Security for profiler-wrapper 1.0.1
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.