# 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.
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.
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 details)
File details
Details for the file timeitd-1.0.tar.gz.
File metadata
- Download URL: timeitd-1.0.tar.gz
- Upload date:
- Size: 2.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cd7afd69909a3fe0acb055dc16fb23299ddf1314bef3e5f8a842a6859fa516c1
|
|
| MD5 |
757010cb64821c633cd33e62e39f8f2e
|
|
| BLAKE2b-256 |
f3490ad509b8a44e880e129ac134ca8db3c285e81737f991c7c13717a26499cd
|