Skip to content

CU-Software/cutime

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

cutime

Simple python decorators for measuring function execution times.


Installation

pip install cutime

Usage

from cutime import gettime, avgtime, sumtime

@gettime
def hello():
    print("Hello World!")

hello()

Build & Install Locally

This will build and test this package through Test PyPI and PyPI. I will make packages under the links Test PyPI and PyPI In the same directory as setup.py, run:

pip install build
python -m build

Publishing

Step 1 - Install needed Tools

pip install hatch twine

Step 2 - Build

hatch build

Step 3 - Test with TestPyPI

python -m twine upload --repository testpypi dist/*

Step 4 - Test the Test

pip install -i https://test.pypi.org/simple/ cutime

Step 5 - Real Upload

python -m twine upload dist/*

Expansions

New Decorators

Category Ideas
Better output control Add options for logging results to file, CSV, or JSON.
Context manager support Add with syntax to measure arbitrary code blocks.
Pretty printing Use tabulate or rich for formatted terminal output.
Statistical summaries Track mean, median, std deviation across runs.
Async support Add timing decorators for async def functions.
Profiling integration Integrate with Python’s cProfile or timeit.
Custom reporting hooks Allow users to supply callbacks for each timing.

Better Packaging

Area Expansion
CLI tool Add a command-line utility: python -m cutime script.py
Docs site Add documentation via MkDocs or Sphinx
Tests Add pytest-based test suite
Badges Add shields.io badges (version, license, PyPI)

About

Uses python to measure the time that a commands execution takes. Can measure python functions, or external system calls.

Resources

License

Stars

0 stars

Watchers

0 watching

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages