Skip to main content
PyPI version

A simple profiling decorator:

In [1]: from profiled import profiled, Profiler

In [2]: @profiled
   ...: def get_answer():
   ...:     return 42
   ...:

In [3]: profiler = Profiler()

In [4]: with profiler:
   ...:     for i in range(100000): get_answer()
   ...:

In [5]: profiler.compute_stats()
Out[5]:
{'get_answer': {'avg': 2.2763967514038087e-07,
  'max': 0.00016736984252929688,
  'min': 0.0,
  'num': 100000,
  'std': 6.953436521202228e-07,
  'tot': 0.022763967514038086}}

The decorator also works with class methods. That’s about it.

Install with pip install profiled.

Metadata

Release files for profiled 2.0.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 profiled 2.0.0
File Size Uploaded Provenance Actions
profiled-2.0.0.tar.gz 2.4 kB Without provenance Details for profiled-2.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for profiled 2.0.0
File Interpreter ABI Platform Actions
profiled-2.0.0-py3-none-any.whl Python 3 none any Details for profiled-2.0.0-py3-none-any.whl

Total release size: 5.3 kB

Release files / profiled-2.0.0.tar.gz

Download URL profiled-2.0.0.tar.gz
Size 2.4 kB
Tags Source
SHA-256 checksum
How to use checksums
3bedc516d5f549ea5a8fd2b92287014952b8d6ea38fdf380ab0f0359558efe1c
BLAKE2b-256 checksum
How to use checksums
77bc07a086c761bbdb70e0f1ffa17db27586c5b81006d2eadc6d4f4169664812
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-39-generic

Release files / profiled-2.0.0-py3-none-any.whl

Download URL profiled-2.0.0-py3-none-any.whl
Size 2.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d8a2c59005c00e65bcc1607b0c06549812f42d7e518f470b4a57fd7e9541b4a2
BLAKE2b-256 checksum
How to use checksums
d1c1f75418cddcd9913addb625859190cc061011ef3ba58a5f84a1e8a6d6d6e4
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via poetry/1.7.1 CPython/3.10.12 Linux/6.2.0-39-generic

Security for profiled 2.0.0

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.

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