Description
This module is designed for setting time stamps in code, convenient to use in cycles.
Installing
pip install tmark
or
pip install git+https://github.com/OnisOris/tmark
Example
import tmark as tm
import time
tracker = tm.LatencyTracker()
# Simulation of a cycle with multiple tags in one iteration
for i in range(12):
tracker.start("operation_1")
time.sleep(0.1 + i * 0.02) # Simulation of first operation
tracker.stop("operation_1")
tracker.start("operation_2")
time.sleep(0.2 + i * 0.03) # Simulation of the second operation
tracker.stop("operation_2")
tracker.start("operation_3")
time.sleep(0.15 + i * 0.01) # Simulation of the third operation
tracker.stop("operation_3")
# Graph from object data
tracker.plot(statistic=True)
# Save to csv file
tracker.save_to_csv()
# Reading from csv file and plotting
tracker.plot_from_csv()
Possible errors
/.../.venv/lib/python3.10/site-packages/tmark/latency_tracker.py:88: UserWarning: FigureCanvasAgg is non-interactive, and thus cannot be shown plt.show()
Solution:
pip install PyQt6
Metadata
Release files for tmark 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 | |
|---|---|---|---|
| tmark-0.0.3.tar.gz | 10.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| tmark-0.0.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 21.0 kB
Release files / tmark-0.0.3.tar.gz
| Download URL | tmark-0.0.3.tar.gz |
|---|---|
| Size | 10.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
8ce0e026443918f30bf54af214e7edd6250b3b51bbd6639ac50300e97b50e1f1
|
|
BLAKE2b-256 checksum How to use checksums |
204e6226ede8cc958670108b528adf3822f2cccfa40d798c63a99b25e51b5b3c
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|
Release files / tmark-0.0.3-py3-none-any.whl
| Download URL | tmark-0.0.3-py3-none-any.whl |
|---|---|
| Size | 10.6 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
341289162eb8dce3af5889e64a819629f510710502fba8573d98ff7889c7f0e4
|
|
BLAKE2b-256 checksum How to use checksums |
0231f1066d6b4d78c1637759e4a817403dbc6ee532e80386c30a07f8e6ebe508
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.12.1
|