{ "info": { "author": "Jelle Smet", "author_email": "development@smetj.net", "bugtrack_url": null, "classifiers": [ "Development Status :: 3 - Alpha", "License :: OSI Approved :: Apache Software License", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 3" ], "description": "WishBone\n========\n\nWhat?\n-----\n\nA small and simple framework to measure and compare the execution speed of\ndifferent methods in a class.\n\nExample\n-------\n\n.. code-block:: python\n\n #!/usr/bin/python\n\n from testlap import TestLap\n from random import randint\n\n class Conditional_vs_Exception():\n '''\n Compare if then against try: except.\n '''\n\n def __init__(self):\n pass\n\n def test_1_if_then_else(self):\n '''Evaluate a value using if then else.'''\n\n number = randint(0,1)\n if number == 1:\n pass\n else:\n pass\n\n def test_2_try_except(self):\n '''Evaluate a value using try: except.'''\n\n number = randint(0,1)\n try:\n number == 1\n except:\n pass\n else:\n pass\n\n if __name__ == '__main__':\n\n test_lap=TestLap(instance=Conditional_vs_Exception(), iterations=10000000)\n test_lap.go()\n\n\n\n.. code-block:: text\n\n Running test_1_if_then_else\n OK\n Running test_2_try_except\n OK\n 3.6.0 (default, Feb 12 2017, 22:33:51)\n [GCC 6.3.1 20161221 (Red Hat 6.3.1-1)]\n Linux-4.9.10-100.fc24.x86_64-x86_64-with-fedora-24-Twenty_Four\n\n Compare if then against try: except.\n\n +---------------------+--------------------------------------+--------+---------+--------------+\n | Function | Description | Result | Seconds | Iterations/s |\n +---------------------+--------------------------------------+--------+---------+--------------+\n | test_1_if_then_else | Evaluate a value using if then else. | OK | 13.586 | 736049.706 |\n | test_2_try_except | Evaluate a value using try: except. | OK | 13.898 | 719536.763 |\n +---------------------+--------------------------------------+--------+---------+--------------+\n", "description_content_type": null, "docs_url": null, "download_url": "https://github.com/smetj/molog/tarball/wishbone_based", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/smetj/testlap", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "testlap", "package_url": "https://pypi.org/project/testlap/", "platform": "Any", "project_url": "https://pypi.org/project/testlap/", "project_urls": { "Download": "https://github.com/smetj/molog/tarball/wishbone_based", "Homepage": "https://github.com/smetj/testlap" }, "release_url": "https://pypi.org/project/testlap/1.0.0/", "requires_dist": null, "requires_python": "", "summary": "A Python framework to measure and compare the execution speed of different methods in a class.", "version": "1.0.0" }, "last_serial": 2681853, "releases": { "1.0.0": [ { "comment_text": "", "digests": { "md5": "4336d8b0f22629718979fa53f40223ac", "sha256": "de17a5d32d02811e1ae11aaffcd381fa5a3d5bfa4415b716b4bd7c3b143b37a1" }, "downloads": -1, "filename": "testlap-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4336d8b0f22629718979fa53f40223ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3096, "upload_time": "2017-03-04T07:04:52", "url": "https://files.pythonhosted.org/packages/27/5d/a056fb48d1fe58c4172400f04c958efde7b562b014ae1f68de00eff94288/testlap-1.0.0.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "4336d8b0f22629718979fa53f40223ac", "sha256": "de17a5d32d02811e1ae11aaffcd381fa5a3d5bfa4415b716b4bd7c3b143b37a1" }, "downloads": -1, "filename": "testlap-1.0.0.tar.gz", "has_sig": false, "md5_digest": "4336d8b0f22629718979fa53f40223ac", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3096, "upload_time": "2017-03-04T07:04:52", "url": "https://files.pythonhosted.org/packages/27/5d/a056fb48d1fe58c4172400f04c958efde7b562b014ae1f68de00eff94288/testlap-1.0.0.tar.gz" } ] }