{ "info": { "author": "Jon Crall", "author_email": "erotemic@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Topic :: Software Development :: Libraries :: Python Modules", "Topic :: Utilities" ], "description": "|Travis| |Codecov| |Appveyor| |Pypi|\n\nTimerit\n=======\n\nA powerful multiline alternative to Python's builtin ``timeit`` module.\n\nDocs will be written at https://timerit.readthedocs.io/en/latest/\n\nDescription\n-----------\n\nEasily do robust timings on existing blocks of code by simply indenting\nthem. There is no need to refactor into a string representation or\nconvert to a single line.\n\nThis is the standalone version of a utility currently in\n`ubelt `__.\n\nInstallation\n------------\n\nFrom pypi:\n^^^^^^^^^^\n\n::\n\n pip install timerit\n\nFrom github:\n^^^^^^^^^^^^\n\n::\n\n pip install git+https://github.com/Erotemic/timerit.git\n\nExamples\n--------\n\nThe quick and dirty way just requires one indent.\n\n.. code:: python\n\n >>> import math\n >>> from timerit import Timerit\n >>> for _ in Timerit(num=200, verbose=2):\n >>> math.factorial(10000)\n Timing for 200 loops\n Timed for: 200 loops, best of 3\n time per loop: best=2.469 ms, mean=2.49 \u00b1 0.037 ms\n\nUse the loop variable as a context manager for more accurate timings or\nto incorporate an setup phase that is not timed. You can also access\nproperties of the ``Timerit`` class to programmatically use results.\n\n.. code:: python\n\n >>> import math\n >>> from timerit import Timerit\n >>> t1 = Timerit(num=200, verbose=2)\n >>> for timer in t1:\n >>> setup_vars = 10000\n >>> with timer:\n >>> math.factorial(setup_vars)\n >>> print('t1.total_time = %r' % (t1.total_time,))\n Timing for 200 loops\n Timed for: 200 loops, best of 3\n time per loop: best=2.064 ms, mean=2.115 \u00b1 0.05 ms\n t1.total_time = 0.4427177629695507\n\nThere is also a simple one-liner that is comparable to IPython magic:\n\nCompare the timeit version:\n\n.. code:: python\n\n >>> %timeit math.factorial(100)\n 564 ns \u00b1 5.46 ns per loop (mean \u00b1 std. dev. of 7 runs, 1000000 loops each)\n\nWith the Timerit version:\n\n.. code:: python\n\n >>> Timerit(100000).call(math.factorial, 100).print()\n Timed for: 1 loops, best of 1\n time per loop: best=4.828 \u00b5s, mean=4.828 \u00b1 0.0 \u00b5s\n\n.. |Travis| image:: https://img.shields.io/travis/Erotemic/timerit/master.svg?label=Travis%20CI\n :target: https://travis-ci.org/Erotemic/timerit\n.. |Codecov| image:: https://codecov.io/github/Erotemic/timerit/badge.svg?branch=master&service=github\n :target: https://codecov.io/github/Erotemic/timerit?branch=master\n.. |Appveyor| image:: https://ci.appveyor.com/api/projects/status/github/Erotemic/timerit?svg=True\n :target: https://ci.appveyor.com/project/Erotemic/timerit/branch/master\n.. |Pypi| image:: https://img.shields.io/pypi/v/timerit.svg\n :target: https://pypi.python.org/pypi/timerit\n\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/Erotemic/timerit", "keywords": "", "license": "Apache 2", "maintainer": "", "maintainer_email": "", "name": "timerit", "package_url": "https://pypi.org/project/timerit/", "platform": "", "project_url": "https://pypi.org/project/timerit/", "project_urls": { "Homepage": "https://github.com/Erotemic/timerit" }, "release_url": "https://pypi.org/project/timerit/0.2.1/", "requires_dist": [ "xdoctest; extra == 'all'", "pytest; extra == 'all'", "pytest-cov; extra == 'all'", "coverage; extra == 'all'", "xdoctest; extra == 'tests'", "pytest; extra == 'tests'", "pytest-cov; extra == 'tests'", "coverage; extra == 'tests'" ], "requires_python": "", "summary": "A powerful multiline alternative to timeit", "version": "0.2.1" }, "last_serial": 4892439, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "a3815f310b602ee3190bad5e52dbd168", "sha256": "7215da4d51e148ca57b3f33a5991cfb2daaf74ed841e658306737699fc882373" }, "downloads": -1, "filename": "timerit-0.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "a3815f310b602ee3190bad5e52dbd168", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 8431, "upload_time": "2018-05-27T19:52:55", "url": "https://files.pythonhosted.org/packages/04/02/2b3e461b0634994dce16df71c9b0019ef5e19d82b881997c5a9c9a289c56/timerit-0.0.1-py2.py3-none-any.whl" } ], "0.0.2": [ { "comment_text": "", "digests": { "md5": "fa136124ee67a337debab676208bbd66", "sha256": "6d2018a1d8470324196d6e234dcb4b95637b35cbe3bf4a8f5a4195cd04400285" }, "downloads": -1, "filename": "timerit-0.0.2-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "fa136124ee67a337debab676208bbd66", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9557, "upload_time": "2018-06-28T03:43:24", "url": "https://files.pythonhosted.org/packages/c0/66/f7b4c9737286fe055f2c46d403015b47e61d4fe8cb81b0d95d3d9f039cd2/timerit-0.0.2-py2.py3-none-any.whl" } ], "0.1.0": [ { "comment_text": "", "digests": { "md5": "b71d7170cf45a789c797ef1a1c12002c", "sha256": "b0a4deaecd1baccf846d97f1862e8f6a5508d686ae35bf55028ca4b370f36153" }, "downloads": -1, "filename": "timerit-0.1.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b71d7170cf45a789c797ef1a1c12002c", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9754, "upload_time": "2018-07-19T15:00:08", "url": "https://files.pythonhosted.org/packages/e6/7e/dbea0d3b88eda9740ad6439c30ee34761f213e4d475cee6f32c94a4dcfa6/timerit-0.1.0-py2.py3-none-any.whl" } ], "0.2.0": [ { "comment_text": "", "digests": { "md5": "52435903589906a8a120fbbacc40c430", "sha256": "a3ff3f7c42ff6f0b49ec9073e11a6cec9a86ecfed163cce2410706e7a422407d" }, "downloads": -1, "filename": "timerit-0.2.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "52435903589906a8a120fbbacc40c430", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9864, "upload_time": "2019-03-04T01:20:45", "url": "https://files.pythonhosted.org/packages/6c/c5/f324c4a7da93b6cf5a91d2cfddad50926248597751a91d096b951a801549/timerit-0.2.0-py2.py3-none-any.whl" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "683167921405f8a02e93a0c46e73b9ab", "sha256": "04d90100d124ec1c58c2091c299d84ce1e143b4f7e321f5f39bc3f12bd66a4f7" }, "downloads": -1, "filename": "timerit-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "683167921405f8a02e93a0c46e73b9ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9926, "upload_time": "2019-03-04T02:28:05", "url": "https://files.pythonhosted.org/packages/6c/dc/1bea352d27a736193fea2bf726cd0a39927cbb5529c72038aed7fcac7bc4/timerit-0.2.1-py2.py3-none-any.whl" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "683167921405f8a02e93a0c46e73b9ab", "sha256": "04d90100d124ec1c58c2091c299d84ce1e143b4f7e321f5f39bc3f12bd66a4f7" }, "downloads": -1, "filename": "timerit-0.2.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "683167921405f8a02e93a0c46e73b9ab", "packagetype": "bdist_wheel", "python_version": "py2.py3", "requires_python": null, "size": 9926, "upload_time": "2019-03-04T02:28:05", "url": "https://files.pythonhosted.org/packages/6c/dc/1bea352d27a736193fea2bf726cd0a39927cbb5529c72038aed7fcac7bc4/timerit-0.2.1-py2.py3-none-any.whl" } ] }