k3stopwatch
StopWatch - library for adding timers and tags in your code for performance monitoring
k3stopwatch is a component of pykit3 project: a python3 toolkit set.
StopWatch operates on a notion of "spans" which represent scopes of code for which we want to measure timing. Spans can be nested and placed inside loops for aggregation.
StopWatch requires a root scope which upon completion signifies the end of the round of measurements. On a server, you might use a single request as your root scope.
StopWatch produces two kinds of reports.
- Aggregated (see _reported_values).
- Non-aggregated or "tracing" (see _reported_traces).
Install
pip install k3stopwatch
Synopsis
import k3stopwatch
sw = k3stopwatch.StopWatch()
with sw.timer("rwoot"):
for i in range(50):
with sw.timer("inner_task"):
print("do_inner_task(i)")
Author
Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Copyright and License
The MIT License (MIT)
Copyright (c) 2015 Zhang Yanpo (张炎泼) drdr.xp@gmail.com
Metadata
Release files for k3stopwatch 0.2.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 | |
|---|---|---|---|
| k3stopwatch-0.2.3.tar.gz | 9.1 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| k3stopwatch-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 17.8 kB
Release files / k3stopwatch-0.2.3.tar.gz
| Download URL | k3stopwatch-0.2.3.tar.gz |
|---|---|
| Size | 9.1 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3e687f3193821c184a3948dc9f85261397b0fc90d7c4da5f92ac46ea55773517
|
|
BLAKE2b-256 checksum How to use checksums |
ca68af9a27d8882c24e088a130d8abe0407070a0cd40196d9a3e5654ecd6fbbb
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|
Release files / k3stopwatch-0.2.3-py3-none-any.whl
| Download URL | k3stopwatch-0.2.3-py3-none-any.whl |
|---|---|
| Size | 8.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
adc9ebd81cb24ad7e50f8db582ccc9b267b44b6cd5ddb48752d37478ce6f52de
|
|
BLAKE2b-256 checksum How to use checksums |
bc31c1398cd77d872fe8a00d83df6cd6b8fbcfcbd7bf70ada943cd326566e47e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.14.8
|