Skip to main content

Tool for timing the execution of Python functions

Project description

Tool for timing the execution of Python functions.

Installation

Install with pip:

pip install clockit

Usage

Run as follows:

$ python
>>> from clockit import clockit
>>> def f(x, y=1):
...     return x, y
...
>>> clocked = clockit(f, 1, y=2)
>>> clocked.result
(1, 2)
>>> clocked.time
0.0005593200330622494

Project details


Download files

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

Source Distribution

clockit-0.2.0.tar.gz (1.7 kB view hashes)

Uploaded Source

Built Distribution

clockit-0.2.0-py2.py3-none-any.whl (3.0 kB view hashes)

Uploaded Python 2 Python 3

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