Skip to main content

Simple timeit decorator for benchmark functions

Project description

# timeitd
A timeit decorator which makes benchmark scripts easy

## Installation
```
$ pip install timeitd
```

## Example
```python
# bench_myfunction.py
from timeitd import timeit
from some_module import myfunction

@timeit(number=10000, unit="ns")
def bench_myfunction():
v = do_something()
myfunction(v)
```

Output of this benchmark script is:
```
bench_myfunction execution avg: 1100.312300004589 ns
```

Dependent on `timeit` module.
Time unit is available for ms, us and ns.

Project details


Release history Release notifications | RSS feed

This version

1.0

Download files

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

Source Distribution

timeitd-1.0.tar.gz (2.0 kB view hashes)

Uploaded Source

Supported by

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