You're Invited:Meet the Socket Team at BlackHat and DEF CON in Las Vegas, Aug 7-8.RSVP
Socket
Socket
Sign inDemoInstall

clockit

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

clockit

Tool for timing the execution of Python functions


Maintainers
1

Readme

clockit |PyPI|_ |Travis|_

.. |PyPI| image:: https://img.shields.io/pypi/v/clockit.svg?style=flat-square&maxAge=3600 .. _PyPI: https://pypi.python.org/pypi/clockit

.. |Travis| image:: https://img.shields.io/travis/rlucioni/clockit.svg?style=flat-square&maxAge=3600 .. _Travis: https://travis-ci.org/rlucioni/clockit

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

clockit uses the timeit module which accepts objects that are callable without arguments.

Keywords

FAQs


Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc