Skip to main content

No project description provided

Project description

Cool-Testing-Timing

Cool Testing - timing. Cool testing lib is an set of tools for developers which would help them with building metrics for software develop.

CT Timing Decorator :stopwatch:

Enhance your Python applications with precise function execution timing! The CT Timing Decorator is a Python library designed to make performance monitoring a breeze. Wrap any function to log its execution time, improving debugging and optimization without the hassle of manual timing code.

:sparkles: Features

Easy Integration - Just a decorator away from timing any function.

Automatic Logging - Logs start, end, and elapsed time with beautiful formatting.

Zero Dependency - Utilizes only Python's standard library.

:arrow_down: Install

:package: PyPI

pip install ct-timing

:computer: Install Locally (From GitHub)

For those who prefer the bleeding-edge version or want to contribute to the development, you can install the library directly from GitHub:

Clone the Repository:

git clone https://github.com/Kotmin/Cool-Testing-Timing.git
cd ct-timing

Install Using Pip:

pip install .

This approach installs the library from the source code, ensuring you have the latest changes or can work on developing new features or fixes.

:star: Live Stats

Section under construction

:rocket: Quick Start

To use the CT Timing Decorator, import the timing decorator from the ct.timing package and apply it to any function:

from ct.timing import timing

@timing
def my_function():
    # Your function logic here
    pass

Run your decorated function as usual and observe detailed timing logs automatically!

:mag: Overview

Why choose CT Timing Decorator over traditional time.start() and time.end() approaches? Simplicity and efficiency. Our decorator abstracts away the boilerplate timing code, allowing you to focus on what matters: your application logic. Additionally, it provides consistent, formatted output that is both human-readable and easy to parse programmatically.

:heavy_check_mark: Benefits over Manual Timing

  • No More Boilerplate: Forget about starting and stopping timers manually.
  • Automatic Logging: Get formatted, easy-to-read logs without extra code.
  • Consistency: Uniform timing and logging logic across all your functions.

:wrench: Additional Settings

CT Timing Decorator comes with a few knobs to tweak:

Custom Logging Function: Override the default logger to integrate with your application's logging system.
Time Format Customization: Change how the elapsed time is displayed to suit your needs.
from ct.timing import timing, set_custom_logger, set_time_format

# Set a custom logger
set_custom_logger(my_custom_logger)

# Customize the time format
set_time_format("%H:%M:%S")

For more advanced usage and contributions, please refer to our GitHub repository.

:heart: Support

Found a bug? Have an idea for improvement? Contributions are welcome! Please open an issue or submit a pull request.

Project details


Release history Release notifications | RSS feed

This version

0.2

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

cool-testing-0.2.tar.gz (6.9 kB view details)

Uploaded Source

Built Distribution

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

cool_testing-0.2-py3-none-any.whl (7.5 kB view details)

Uploaded Python 3

File details

Details for the file cool-testing-0.2.tar.gz.

File metadata

  • Download URL: cool-testing-0.2.tar.gz
  • Upload date:
  • Size: 6.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cool-testing-0.2.tar.gz
Algorithm Hash digest
SHA256 50b78a8101c6b5b2ef21cfa0b4e2df97f7eff17027cd7a39558e19e90908e3e2
MD5 6ce65faecc60cfa7aadc5c156fae4d2b
BLAKE2b-256 4dde90b3fc945865c8f7335b36ee120ef55061a8ddcdc0bc8164987f35cd7be7

See more details on using hashes here.

File details

Details for the file cool_testing-0.2-py3-none-any.whl.

File metadata

  • Download URL: cool_testing-0.2-py3-none-any.whl
  • Upload date:
  • Size: 7.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/4.0.2 CPython/3.11.7

File hashes

Hashes for cool_testing-0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 276ffe8e4afe6a9a60c769228cd59969a8d0bf69cba32b0a6c2609ced6c7af6b
MD5 556784ac4c6000fd7f763b5f2c51f3d4
BLAKE2b-256 2c3ef74320c36029a1f869e3c2254bfc7db5dcdae2739e6abbde172a741c0fa7

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