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.4.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.4.tar.gz.
File metadata
- Download URL: tsktimer-0.0.4.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 |
01c87a440e3b7c449afc1f428fa7de463e203b947a41f6006d9e0962f834e644
|
|
| MD5 |
02e685d58799cbdb8b9fe26cfebf5621
|
|
| BLAKE2b-256 |
a9fd4c88173af2a65cc464ee79800ddb9db524956cf4b84e49e29cdf89833e13
|
File details
Details for the file tsktimer-0.0.4-py3-none-any.whl.
File metadata
- Download URL: tsktimer-0.0.4-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 |
e66898e3a9c0f892503bfe3bddf875fb5183ca19cb572f7be93d756858948db7
|
|
| MD5 |
0baa031b8ae43d3129e825f2238385d7
|
|
| BLAKE2b-256 |
2db82b4a0386dc447e963619775147d95a040485abf1aa3f809820583f24bc10
|