{ "info": { "author": "Stephen Mitchell", "author_email": "stephen@echodot.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: Apache Software License", "Natural Language :: English", "Programming Language :: Python", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Topic :: Software Development" ], "description": "benchit - Quick n' Easy Python Benchmarking\n-------------------------------------------\n\nQuickly find where your code is spending its time.\n\n|Build Status|\n\nBenchit is intended to be a minimalistic library that times how long it\ntakes to get from point A to point B. It helps detect unoptimized code.\n\nBenchit is only compatible with python 3. For python 2 support, use\nbenchit==0.2.6 (https://pypi.python.org/pypi/bench-it/0.2.6)\n\nInstallation\n~~~~~~~~~~~~\n\n::\n\n pip install bench-it\n\nExample\n~~~~~~~\n\n::\n\n from benchit import BenchIt\n from time import sleep\n\n\n def demo_benchmark():\n b = BenchIt() # starts the timer\n\n # do stuff\n sleep(1); b() # Add marker after this code. Code used as marker name.\n\n sleep(.2);\n sleep(.3);\n sleep(.4);\n b(\"More stuff done\") # Add a custom named marker\n\n for i in range(1, 5):\n sleep(.1); b() # Code can be marked in a loop\n\n b.display() # Display output as a table\n\n\n demo_benchmark()\n\n\n BenchIt\n +-----------------+----------------+------------+------+----------+---------+---------+\n | Marker | Method | Line | Hits | Avg Time | Runtime | Percent |\n +-----------------+----------------+------------+------+----------+---------+---------+\n | sleep(1) | demo_benchmark | demo.py:9 | 1 | 1.01341 | 1.01341 | 43.33 |\n | More stuff Done | demo_benchmark | demo.py:14 | 1 | 0.91278 | 0.91278 | 39.03 |\n | sleep(.1) | demo_benchmark | demo.py:17 | 4 | 0.10306 | 0.41223 | 17.63 |\n +-----------------+----------------+------------+------+----------+---------+---------+\n Total runtime: 2.33860\n\nHow to Use\n~~~~~~~~~~\n\nInstantiating the class starts the timer. BenchIt is run as a singleton.\nRe-instantiating anywhere in your code will pull in the previously\ninstantiated timer. To create a new timer, initialize BenchIt with a\nunique name.\n\n::\n\n b = BenchIt()\n\n b2 = BenchIt() # b == b2\n\n b3 = BenchIt(\"Timer A\") # b != b3\n\nSet a marker after some code.\n\n::\n\n call_a_method(); b() # Quickly add a marker after a method\n\n method1()\n method2()\n b(\"Two methods called\") # Or create a manual marker after a chunk of code\n\nStop and display the table for analysis.\n\n::\n\n b.display()\n\nMethods\n~~~~~~~\n\n``benchit.__init__()`` Instantiate and start the timer.\n\n``benchit.__call__(marker_name)`` Add marker at this point.\n\n``benchit.stop()`` Optionally, stop the timer at a point.\n\n``benchit.display()`` Display the table. Stops the timer if running.\n\nCredits\n~~~~~~~\n\n- Special thanks Luke Maurits for\n `prettytable `__\\ \\*\n\n.. |Build Status| image:: https://secure.travis-ci.org/scuml/benchit.png?branch=master\n :target: http://travis-ci.org/scuml/benchit\n", "description_content_type": "", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "http://github.com/scuml/benchit", "keywords": "", "license": "Copyright 2016-2018 Stephen Mitchell\n\nLicensed under the Apache License, Version 2.0 (the \"License\");\nyou may not use this file except in compliance with the License.\nYou may obtain a copy of the License at\n\n http://www.apache.org/licenses/LICENSE-2.0\n\nUnless required by applicable law or agreed to in writing, software\ndistributed under the License is distributed on an \"AS IS\" BASIS,\nWITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\nSee the License for the specific language governing permissions and\nlimitations under the License.", "maintainer": "", "maintainer_email": "", "name": "bench-it", "package_url": "https://pypi.org/project/bench-it/", "platform": "", "project_url": "https://pypi.org/project/bench-it/", "project_urls": { "Homepage": "http://github.com/scuml/benchit" }, "release_url": "https://pypi.org/project/bench-it/1.0.1/", "requires_dist": null, "requires_python": "", "summary": "Quick and easy python benchmarking.", "version": "1.0.1" }, "last_serial": 3692485, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "21d1aeb9fe48e89c5e791ecb8e6ca927", "sha256": "f861efdade7ac6e017391da05ec133a13442994b8dce04b66bfc16a877a3a027" }, "downloads": -1, "filename": "bench-it-0.2.tar.gz", "has_sig": false, "md5_digest": "21d1aeb9fe48e89c5e791ecb8e6ca927", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15517, "upload_time": "2016-01-03T17:47:01", "url": "https://files.pythonhosted.org/packages/46/02/2891574824d1597ac2914aa7b33f9309ccdc8adea98d76659c4471fdff33/bench-it-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "e5778db5c3aee87fa03c175fcdeb72ef", "sha256": "5d20f04e77efdbd172ff42a2c52976c94635fc1823069f0fd4b013365b5f8423" }, "downloads": -1, "filename": "bench-it-0.2.1.tar.gz", "has_sig": false, "md5_digest": "e5778db5c3aee87fa03c175fcdeb72ef", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16404, "upload_time": "2016-01-03T17:52:45", "url": "https://files.pythonhosted.org/packages/44/26/268f476c94744b6a54340a0c2954713b82db2094c59adab721d0186ac5d5/bench-it-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "0ff73f28abedb0778efe50bd67eb422b", "sha256": "10cc488750f82f2cbc7df720cfe111a29eed872ad5fa24b84ac3fad127119262" }, "downloads": -1, "filename": "bench-it-0.2.2.tar.gz", "has_sig": false, "md5_digest": "0ff73f28abedb0778efe50bd67eb422b", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16550, "upload_time": "2016-01-03T18:06:50", "url": "https://files.pythonhosted.org/packages/d7/5e/af04f0e6f02e1aedb81a3b17018f44bb3410f358752846bef9d6b26a4667/bench-it-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "99257ab3f50e7efad4316bfd21764fd8", "sha256": "1a2e72a06ec9d2c59dbec8c56fc43d7be2aef56b4f0a6f508f9199edc7f01abc" }, "downloads": -1, "filename": "bench_it-0.2.3-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "99257ab3f50e7efad4316bfd21764fd8", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18232, "upload_time": "2016-01-04T13:10:46", "url": "https://files.pythonhosted.org/packages/1f/d2/f7b5bb808bcd63a802c0ac356e71ad03fe4f38be54ec60320b5885438ba8/bench_it-0.2.3-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c2189a0bccbe25cf934118a82884eb63", "sha256": "2eddf6e8b6d97ae33192e41ad3dcba1e07a3f23144521422de5de42272c797d7" }, "downloads": -1, "filename": "bench-it-0.2.3.tar.gz", "has_sig": false, "md5_digest": "c2189a0bccbe25cf934118a82884eb63", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15544, "upload_time": "2016-01-04T13:10:34", "url": "https://files.pythonhosted.org/packages/fb/69/a2decf63b9deb61ba3c23ee902d57fe9a8bcd8b8a2d8033125b4271451a5/bench-it-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "da16360357e7a2e60273a35b578c6dd3", "sha256": "7a805f93610d1e6bb072b68b652924e7e446f52547b509dc953536090d9afbe1" }, "downloads": -1, "filename": "bench_it-0.2.4-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "da16360357e7a2e60273a35b578c6dd3", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18294, "upload_time": "2016-01-04T13:33:17", "url": "https://files.pythonhosted.org/packages/a7/8f/f1500bcdb7014e21c0822f19c936b4f6401f4ce4eec2744e9b9d50242827/bench_it-0.2.4-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "26a8407db2437fb1b52541de43470ef2", "sha256": "e2736861f5ed7de9c540e92d0327cd42f1c1512a087089e3c216c3374ae9014a" }, "downloads": -1, "filename": "bench-it-0.2.4.tar.gz", "has_sig": false, "md5_digest": "26a8407db2437fb1b52541de43470ef2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15582, "upload_time": "2016-01-04T13:33:12", "url": "https://files.pythonhosted.org/packages/f7/c7/216b05ac222ef6bd8e2455fe1c98921fea73d3675d708412c08d68e060c0/bench-it-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "cf1cae8261706b28874dbc6397ca14e5", "sha256": "0fae18a12173504d4e9dd499f2f7eedd6343d320271944d1a2f09b188e573149" }, "downloads": -1, "filename": "bench_it-0.2.5-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "cf1cae8261706b28874dbc6397ca14e5", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18260, "upload_time": "2016-01-04T15:01:38", "url": "https://files.pythonhosted.org/packages/ec/9d/3795cfe62dd55461de36ab2464e684d064aa52baffdb16c97778a0036f23/bench_it-0.2.5-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "2c6d2ebc62a0eeee894f22f989ea9e1f", "sha256": "f804b0909226226d24edafaa8b7c571afabb91c479352734ecbf65a9f67b2412" }, "downloads": -1, "filename": "bench-it-0.2.5.tar.gz", "has_sig": false, "md5_digest": "2c6d2ebc62a0eeee894f22f989ea9e1f", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15558, "upload_time": "2016-01-04T15:01:19", "url": "https://files.pythonhosted.org/packages/83/d7/743df0c5d7901226c2cb81d5247344a4cd32f52d9bd28f7e2b9b05e9e10f/bench-it-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "055d351e6a7c782c5ffb5cc3426b2249", "sha256": "548a38627e0d64c43577bd83bb25e6945f0232fe13ea33271db1a4563b7ad654" }, "downloads": -1, "filename": "bench_it-0.2.6-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "055d351e6a7c782c5ffb5cc3426b2249", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18294, "upload_time": "2018-01-04T22:40:04", "url": "https://files.pythonhosted.org/packages/8d/c8/4bdc46339f409a6cd81a40f7fb3b3e8238c68bc466a677af4d5db92ebdad/bench_it-0.2.6-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "4246473935a3125a0be1f9dcf921c929", "sha256": "9b888195fe0b97dd7ea7539aeb778be531dcb0a86ef13797d39adff2d687a7b2" }, "downloads": -1, "filename": "bench-it-0.2.6.tar.gz", "has_sig": false, "md5_digest": "4246473935a3125a0be1f9dcf921c929", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 15582, "upload_time": "2018-01-04T22:40:03", "url": "https://files.pythonhosted.org/packages/51/29/1ad763ba459af7f87483c2297facd6c6bf9d71c7e3767b3d5657a55e7a0b/bench-it-0.2.6.tar.gz" } ], "1.0.0": [ { "comment_text": "", "digests": { "md5": "9242551fb64b5e2ba7e1576ad680fe20", "sha256": "51cf0e13abc06e9b22fc54cfeae1e6985d184539b39eea82283ee69088bb3bfd" }, "downloads": -1, "filename": "bench_it-1.0.0-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "9242551fb64b5e2ba7e1576ad680fe20", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 18949, "upload_time": "2018-03-21T17:04:46", "url": "https://files.pythonhosted.org/packages/d2/42/16b85cb59c95892c41a3756a96644fb26010d2237380746bf75fa1275902/bench_it-1.0.0-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "5b6430b7f3488797af720fbd6b19aa86", "sha256": "8ebb83df5cb707611980860fba0b671f2b563c77f0b9e6ea308fafe608a42150" }, "downloads": -1, "filename": "bench-it-1.0.0.tar.gz", "has_sig": false, "md5_digest": "5b6430b7f3488797af720fbd6b19aa86", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16120, "upload_time": "2018-03-21T17:04:43", "url": "https://files.pythonhosted.org/packages/0f/8e/928475b4928d6ea0eb5774cb71aab966daf87cc9cabd2f8770a631e2e5df/bench-it-1.0.0.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "b21deb22eed8a8b0359dc48aacf7fcff", "sha256": "d7f588f99de025735f00e24c8bc56b32da0a86f2e9fa6fe97befaa878cca2a46" }, "downloads": -1, "filename": "bench_it-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b21deb22eed8a8b0359dc48aacf7fcff", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19065, "upload_time": "2018-03-21T17:06:21", "url": "https://files.pythonhosted.org/packages/e3/c4/7f91020f875a0e7f1ca880b5ac7c047e021366408f608e106c60799670e8/bench_it-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a6b5d5191d704c3494552da67c985e5", "sha256": "2e14c4b72df01d2470fa73200c03c3283b4a5f53d257a728af8e4adbde76d36c" }, "downloads": -1, "filename": "bench-it-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8a6b5d5191d704c3494552da67c985e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16230, "upload_time": "2018-03-21T17:06:19", "url": "https://files.pythonhosted.org/packages/84/1d/715aeb5db587ecd462c0be5ed69959466d6681a296905a8fc40722a15d99/bench-it-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "b21deb22eed8a8b0359dc48aacf7fcff", "sha256": "d7f588f99de025735f00e24c8bc56b32da0a86f2e9fa6fe97befaa878cca2a46" }, "downloads": -1, "filename": "bench_it-1.0.1-py2.py3-none-any.whl", "has_sig": false, "md5_digest": "b21deb22eed8a8b0359dc48aacf7fcff", "packagetype": "bdist_wheel", "python_version": "2.7", "requires_python": null, "size": 19065, "upload_time": "2018-03-21T17:06:21", "url": "https://files.pythonhosted.org/packages/e3/c4/7f91020f875a0e7f1ca880b5ac7c047e021366408f608e106c60799670e8/bench_it-1.0.1-py2.py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "8a6b5d5191d704c3494552da67c985e5", "sha256": "2e14c4b72df01d2470fa73200c03c3283b4a5f53d257a728af8e4adbde76d36c" }, "downloads": -1, "filename": "bench-it-1.0.1.tar.gz", "has_sig": false, "md5_digest": "8a6b5d5191d704c3494552da67c985e5", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 16230, "upload_time": "2018-03-21T17:06:19", "url": "https://files.pythonhosted.org/packages/84/1d/715aeb5db587ecd462c0be5ed69959466d6681a296905a8fc40722a15d99/bench-it-1.0.1.tar.gz" } ] }