Simple way to understand the speed of your tasks
Project description
TskTimer
Simple way to measure the speed of you function/task/app/project. Allows you to analyze every function or even code blocks on how efficient they are.
Installation
pip install -U tsktimer
Quick Start
from tsktimer import timeit
import time
@timeit(name="heavy_task")
def heavy_task():
time.sleep(2)
heavy_task()
Time: 2.000088691711426s
Architecture
- IN CORE:
- TskTimer: the main class that actually measures time
- Context: Using ContextTskTimer you can measure time of the code block by just wrapping it using
with ContextTskTimer() - Decorator: helps to measure time for functions:
- timeit - measures the function once and prints result
- ntimesit - helps to measure time by running function multiple times
- IN METRICS:
- History: allows you to record all measured time all over the program.
- Export: you can export all your records into csv and json
- Stats: shows stats for one single timer
- IN UTILS:
- Formatting: using TskTimerFormat you can set output to be in seconds or milliseconds
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
tsktimer-0.0.5.tar.gz
(7.6 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 tsktimer-0.0.5.tar.gz.
File metadata
- Download URL: tsktimer-0.0.5.tar.gz
- Upload date:
- Size: 7.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8e270ce7b58da9ac6ca343d7b4dab1dd2c031aa296e788e0079759b20266ad38
|
|
| MD5 |
254f2d67b0ca5a2202c5dcf265bd30d8
|
|
| BLAKE2b-256 |
79a45a3521244f2e8158f9ad9475cbc2da1ebeaf13becc5f3a490843f8618ec3
|
File details
Details for the file tsktimer-0.0.5-py3-none-any.whl.
File metadata
- Download URL: tsktimer-0.0.5-py3-none-any.whl
- Upload date:
- Size: 9.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
44c1a1d85b8c07135b2ea074547fe85d1a8de3a25bfdff8a1453b8bbbdbbc7cc
|
|
| MD5 |
8937fe71c5b781fb90693cfdc260a148
|
|
| BLAKE2b-256 |
c18ed36d1d06128d0060c2b3fc172e39520b4f3abcf0f1f5b099240d024ea6a7
|