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.3.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.3.tar.gz.
File metadata
- Download URL: tsktimer-0.0.3.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 |
7e9ae6ffb7d15dfb71897100b727662c6a68f76452401512955c8ee2547652a6
|
|
| MD5 |
d7fdf8bb4d7cc0e36c346929d5ce3e0b
|
|
| BLAKE2b-256 |
902a50649edd584f5b516410f9555a4f29e6fcf75f2bb96a828df8d143baac91
|
File details
Details for the file tsktimer-0.0.3-py3-none-any.whl.
File metadata
- Download URL: tsktimer-0.0.3-py3-none-any.whl
- Upload date:
- Size: 9.1 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 |
e87f57edbd3d6ea5e82c4b56e61001df1a5515a76d6561e1b9bcc8df25561b77
|
|
| MD5 |
51c0892ff48eb712b1ea2aac07165da0
|
|
| BLAKE2b-256 |
fe1b76d7a3157706b1418b3f025b136b7df64c16845767d8f1f19aef7267dc1c
|