code-meters -- Monitor resource usage of Python code
Example
As a context manager:
from meters import ResourceMeter
with ResourceMeter("Data Processing"):
data = [x**2 for x in range(1000000)]
# Data Processing: wall time: 0.24156 s (241560 microseconds), CPU time: 0.226669 s (226669 microseconds), memory: 92925952 bytes (88.6211 MiB)
As a function decorator:
from meters import metered
@metered
def process(n):
return sum([x**3 for x in range(n)])
print(process(1000000))
# process: wall time: 0.310323 s (310323 microseconds), CPU time: 0.291285 s (291285 microseconds), memory: 152657920 bytes (145.586 MiB)
# 249999500000250000000000
Metadata
Release files for code-meters 0.0.3
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 |
|---|---|---|---|---|
| code-meters-0.0.3.tar.gz | 10.1 kB | Without provenance | Details for code-meters-0.0.3.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| code_meters-0.0.3-py3-none-any.whl | Python 3 | none | any | Details for code_meters-0.0.3-py3-none-any.whl |
Total release size: 18.9 kB
Release files / code-meters-0.0.3.tar.gz
| Download URL | code-meters-0.0.3.tar.gz |
|---|---|
| Size | 10.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
1c9b9e4f078d0df9290ea48bdeed5d3e7102261c3fccb68253e9fea9071bafdb
|
|
BLAKE2b-256 checksum How to use checksums |
b7c649cb64fc3f7cdb12f10aad07f5ab7a6a750f81c5fc9c6cd912a7471364cf
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Release files / code_meters-0.0.3-py3-none-any.whl
| Download URL | code_meters-0.0.3-py3-none-any.whl |
|---|---|
| Size | 8.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
d77fbe9bdfb2b50239addc1976a66867dff6031e1c79be5962ede903fba92ef6
|
|
BLAKE2b-256 checksum How to use checksums |
453ded5fea1e8b2b6f86116a8fbe7cf50194f488276db86871fce39c74e620fb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.0.0 CPython/3.10.10
|
Security for code-meters 0.0.3
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.