A simple timing library for Python
Project description
clockwise 🕰️
Simple but expressive timing package in Python
Installation
pip install clockwise
Minimal Example
import clockwise
@clockwise.timing("time-as-decorator")
def foo(a: int):
return a + 4
def main():
for i in range(10):
foo(i)
with clockwise.timing_context("time-as-context"):
foo(1)
clockwise.print_timings()
if __name__ == '__main__':
main()
Debug Mode
The profiling is skipped when running in optimized mode using the -O or -OO tags.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
clockwise-1.0.4.tar.gz
(3.4 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file clockwise-1.0.4.tar.gz.
File metadata
- Download URL: clockwise-1.0.4.tar.gz
- Upload date:
- Size: 3.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
331c591080a775bd38142b70c156f9d74f7353a4f39e6cd9ecd3946adbc3cea9
|
|
| MD5 |
d9697823a46f5bbd498bb06c5458481c
|
|
| BLAKE2b-256 |
9f44c1f6dc97778ccc17821d8ff681376e0f19f3c1c1ffcd47bab8aea2d32e01
|
File details
Details for the file clockwise-1.0.4-py3-none-any.whl.
File metadata
- Download URL: clockwise-1.0.4-py3-none-any.whl
- Upload date:
- Size: 4.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.10.16
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d62a5ab1966eb8ae7ca81f8dc35c46e715fd3a8bc19788885ec6a325ed37145
|
|
| MD5 |
48bd6b4745816b0930ecbef380528fd1
|
|
| BLAKE2b-256 |
cfbb0646912ad32f8638524a5279e54dfba3b47e56bf02905c873523374a9a89
|