Lauda
A very simple python module for measuring time. Github: https://github.com/astagi/lauda
Usage
You can use lauda StopWatch to measure a portion of code
from lauda import StopWatch
watch = StopWatch()
watch.start()
for i in range(10000000):
pass
watch.stop()
print ('Time spent in range {0}'.format(watch.elapsed_time))
If you want to measure an entire function execution, you can decorate it using the stopwatch decorator
from lauda import stopwatch
@stopwatch
def awesome_mul(a, b):
return a * b
By default stopwatch decorator will print the time spent inside the decorated function, if you want more control you can pass to your decorator a callback that will receive a StopWatch instance and the decorated function.
from lauda import stopwatch
def stopwatch_sum_cb(watch, function):
print ('Time spent {0}'.format(watch.elapsed_time))
@stopwatch(callback=stopwatch_sum_cb)
def awesome_sum(a, b):
return a + b
Metadata
Release files for lauda 1.0.0
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 | |
|---|---|---|---|---|
| lauda-1.0.0.tar.gz | 1.8 kB | Without provenance | Details |
Release files / lauda-1.0.0.tar.gz
| Download URL | lauda-1.0.0.tar.gz |
|---|---|
| Size | 1.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
6acace94b046891b96a0c14bfcd5e87b85aab22cc0b4fae605721140dc18f2de
|
|
BLAKE2b-256 checksum How to use checksums |
2b095e3a5116e64ed4b6bd38ef25d9bbdab0b202aedb9646cb5d1e7dfb3ffde8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
Security for lauda 1.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.