Skip to main content
Join the official 2019 Python Developers SurveyStart the survey!

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

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.

Files for timeitd, version 1.0
Filename, size File type Python version Upload date Hashes
Filename, size timeitd-1.0.tar.gz (2.0 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN SignalFx SignalFx Supporter DigiCert DigiCert EV certificate StatusPage StatusPage Status page