Metadata-Version: 2.5
Name: performance-decorator
Version: 0.1.0
Summary: A small decorator that measures and reports function execution time.
Project-URL: Homepage, https://pypi.org/project/performance-decorator/
Project-URL: Repository, https://github.com/leonardobartolelli/performance-decorator
Author: Leonardo Bartolelli
License: MIT
License-File: LICENSE
Keywords: decorator,performance,timing
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Programming Language :: Python :: 3.8
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.8
Description-Content-Type: text/markdown

# performance-decorator

Measure function execution time with a simple decorator.

## Installation

```bash
pip install performance-decorator
```

## Usage

```python
from performance import performance


@performance
def calculate():
    return sum(range(100_000))


result = calculate()
print(result)
print(calculate.last_duration)  # elapsed time in seconds
print(calculate.execution_times)  # duration of every completed call
```

Each call prints a line such as:

```text
calculate took 0.002341 seconds
```

The wrapped function's return value and metadata are preserved. Timing is
recorded even when the wrapped function raises an exception.
