Skip to main content

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


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)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

tsktimer-0.0.4-py3-none-any.whl (9.2 kB view details)

Uploaded Python 3

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

Hashes for tsktimer-0.0.4.tar.gz
Algorithm Hash digest
SHA256 01c87a440e3b7c449afc1f428fa7de463e203b947a41f6006d9e0962f834e644
MD5 02e685d58799cbdb8b9fe26cfebf5621
BLAKE2b-256 a9fd4c88173af2a65cc464ee79800ddb9db524956cf4b84e49e29cdf89833e13

See more details on using hashes here.

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

Hashes for tsktimer-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 e66898e3a9c0f892503bfe3bddf875fb5183ca19cb572f7be93d756858948db7
MD5 0baa031b8ae43d3129e825f2238385d7
BLAKE2b-256 2db82b4a0386dc447e963619775147d95a040485abf1aa3f809820583f24bc10

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page