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 details)

Uploaded Source

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

Hashes for timeitd-1.0.tar.gz
Algorithm Hash digest
SHA256 cd7afd69909a3fe0acb055dc16fb23299ddf1314bef3e5f8a842a6859fa516c1
MD5 757010cb64821c633cd33e62e39f8f2e
BLAKE2b-256 f3490ad509b8a44e880e129ac134ca8db3c285e81737f991c7c13717a26499cd

See more details on using hashes here.

Supported by

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