{ "info": { "author": "Robin Schroer", "author_email": "sulami@peerwire.org", "bugtrack_url": null, "classifiers": [ "Development Status :: 4 - Beta", "Environment :: Console", "Intended Audience :: Developers", "Intended Audience :: System Administrators", "License :: OSI Approved :: MIT License", "Natural Language :: English", "Operating System :: OS Independent", "Programming Language :: Python", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3.2", "Programming Language :: Python :: 3.3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Topic :: Software Development", "Topic :: Software Development :: Testing" ], "description": "Nozdormu\n========\n\nPython benchmarking for humans and dragons.\n\n.. image:: https://img.shields.io/pypi/v/nozdormu.svg?style=flat-square\n :target: https://pypi.python.org/pypi/nozdormu\n\n.. image:: https://img.shields.io/pypi/dm/nozdormu.svg?style=flat-square\n :target: https://pypi.python.org/pypi/nozdormu\n \nFeatures\n--------\n\n- Unittest-style benchmark setup (TestCase -> BenchBatch)\n- ``setUp``/``tearDown`` are excluded from timing\n- Precise even for very fast benchmarks by running them for at least 1ms\n or 16 times, whichever takes longer\n- Timing down to the nanosecond\n- Benchmarks in a batch are run interleaved to reduce jitter from random load\n- Manual GC to prevent interference with the benchmarks\n- Results are saved into a human-readable json file and used as baseline for\n future tests\n- Just a few milliseconds overhead\n\nRequirements\n------------\n\n- Python 2.6+ / 3.2+\n\nUsage example\n-------------\n\n.. code-block:: python\n\n import nozdormu\n\n class MyBenchBatch(nozdormu.BenchBatch):\n def bench_one(self):\n pass\n\n def bench_two(self):\n pass\n\n class AnActualBenchBatch(nozdormu.BenchBatch):\n def setUp(self):\n import random\n self.r = random\n\n def bench_list_creation(self):\n l = []\n for i in range(100):\n l.append(i)\n\n def bench_random_addition(self):\n l = []\n for i in range(100):\n l.append(self.r.randint(0, 100))\n\n def bench_import_math(self):\n import math\n\n if __name__ == '__main__':\n nozdormu.main()\n\nyields\n\n::\n\n Starting benchmark session\n\n Running Batch: AnActualBenchBatch\n bench_random_addition: 152\u03bcs (2ms / 16 runs) (-6\u03bcs / 3.6%)\n bench_list_creation: 8\u03bcs (1ms / 127 runs) (-85ns / 1.1%)\n bench_import_math: 954ns (1ms / 1049 runs) (new)\n Batch finished, time: 12ms\n\n Running Batch: MyBenchBatch\n bench_one: 236ns (1ms / 4243 runs) (-13ns / 5.4%)\n bench_two: 232ns (1ms / 4305 runs) (-6ns / 2.7%)\n Batch finished, time: 9ms\n\n Benchmarking finished\n 2 batches, 5 benchmarks\n total time: 23ms\n\nwith some Cucumber-inspired colouring if your terminal supports that.\n\nUsage\n-----\n\nAs you can see above, there are few things for you to do. The general structure\nis very similar to unittests. First ``import nozdormu``, then subclass\n``nozdormu.BenchBatch`` as often as you need to. Each batch can hold as many\nbenchmarks as you need it to.\n\nTo get executed, benchmarks have to start with 'bench' (like unittests have to\nstart with 'test'), and just like in unittests, you can override the class\nmethods `setUp` and `tearDown` for preparations and/or mocking. Both these\nfunctions are run before and after each benchmark execution and will be\nexcluded from the benchmark timing (but included in the total time).\n\nBenchmarks that take less than 1ms will be executed repeatedly until they\naccumulate at least 1ms of total runtime. This happens on a per-batch basis\nand the benchmarks of a batch will rotate until they all ran long enough. This\nshould reduce jitter from other system load for these extremely fast\nbenchmarks.\n\nAcknowledgements\n----------------\n\nIdeas and inspiration by:\n\n- Python's unittest and timeit modules\n- GRB's readygo\n- Cucumber", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/sulami/nozdormu", "keywords": null, "license": "MIT", "maintainer": null, "maintainer_email": null, "name": "nozdormu", "package_url": "https://pypi.org/project/nozdormu/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/nozdormu/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/sulami/nozdormu" }, "release_url": "https://pypi.org/project/nozdormu/0.3.3/", "requires_dist": null, "requires_python": null, "summary": "Python benchmarking for humans and dragons", "version": "0.3.3" }, "last_serial": 1808033, "releases": { "0.2": [ { "comment_text": "", "digests": { "md5": "b2cc42c3ef2e8327b5afd69f15b2a6a6", "sha256": "654ac4867b2ba9f7325319fdc37aab80d9753428ff8ca9152f0cb1915509de29" }, "downloads": -1, "filename": "nozdormu-0.2.tar.gz", "has_sig": false, "md5_digest": "b2cc42c3ef2e8327b5afd69f15b2a6a6", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4586, "upload_time": "2014-11-17T20:14:52", "url": "https://files.pythonhosted.org/packages/9c/3b/0842f9d4460bbfed7947e5a8e4c0bba530a2b57172935771f56b08b97ec2/nozdormu-0.2.tar.gz" } ], "0.2.1": [ { "comment_text": "", "digests": { "md5": "f007408850d3000513e1ff73b3fe2245", "sha256": "0dcedfcf9f4ca86b89f5f870b847931fc5517c5e52cb65b1e53f4764ab00ecde" }, "downloads": -1, "filename": "nozdormu-0.2.1.tar.gz", "has_sig": false, "md5_digest": "f007408850d3000513e1ff73b3fe2245", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4598, "upload_time": "2014-11-18T10:38:30", "url": "https://files.pythonhosted.org/packages/1e/21/3320ba71364bfaabe059453bde6371f3f2b476be388c91bf831e51ebc856/nozdormu-0.2.1.tar.gz" } ], "0.2.2": [ { "comment_text": "", "digests": { "md5": "8209a9ac2095c65ebaa5bf560ae80b20", "sha256": "53c33675b816df3423ae9116e4ce737e8450527201c64532650e8e6f9e492889" }, "downloads": -1, "filename": "nozdormu-0.2.2.tar.gz", "has_sig": false, "md5_digest": "8209a9ac2095c65ebaa5bf560ae80b20", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4611, "upload_time": "2014-11-19T19:26:08", "url": "https://files.pythonhosted.org/packages/e6/65/6de18dd6930a623a08716ffaf6b79e8855a95ad96bd64f8bec623e78eb42/nozdormu-0.2.2.tar.gz" } ], "0.2.3": [ { "comment_text": "", "digests": { "md5": "1941ff8d1060317fc80847fe1c6b9ede", "sha256": "6e7b45c1772d87642c901db964c00f569557c10298ca71484fe5435af82cf5c4" }, "downloads": -1, "filename": "nozdormu-0.2.3.tar.gz", "has_sig": false, "md5_digest": "1941ff8d1060317fc80847fe1c6b9ede", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4700, "upload_time": "2014-11-19T23:32:48", "url": "https://files.pythonhosted.org/packages/d6/90/b25a2d968503691c723881ce391f2e6ab8859deae8ad4dde27d9ab8dfb46/nozdormu-0.2.3.tar.gz" } ], "0.2.4": [ { "comment_text": "", "digests": { "md5": "708469b97a226e54e0191aaa223d3b07", "sha256": "281d2818bc9aac5a751ca84ecf573daf956e4db277fdef1d2062676f840bcd1a" }, "downloads": -1, "filename": "nozdormu-0.2.4.tar.gz", "has_sig": false, "md5_digest": "708469b97a226e54e0191aaa223d3b07", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4718, "upload_time": "2014-11-19T23:47:01", "url": "https://files.pythonhosted.org/packages/ef/e7/feca9f6934f5262cb8058db45688e8cc7f3a2e9a6aa4cb01f8b62e3b9008/nozdormu-0.2.4.tar.gz" } ], "0.2.5": [ { "comment_text": "", "digests": { "md5": "ac1790ba91902d2353ac74816f0c5e08", "sha256": "dc15a39b78c01a173c97d4537ec6133efce2e9226ab6608ed6122a82ce9d40fd" }, "downloads": -1, "filename": "nozdormu-0.2.5.tar.gz", "has_sig": false, "md5_digest": "ac1790ba91902d2353ac74816f0c5e08", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5012, "upload_time": "2014-11-20T23:34:13", "url": "https://files.pythonhosted.org/packages/a1/81/068431c643ca090e7ab7202ba9d209dfcfc73776c582864dff49be3b3fe1/nozdormu-0.2.5.tar.gz" } ], "0.2.6": [ { "comment_text": "", "digests": { "md5": "cc78b9dcece5e04e98dc9cbacf5139be", "sha256": "f8090440ae2400be7d36a0103ef59f3932ac55313ab405ff8c8bb6693af8480a" }, "downloads": -1, "filename": "nozdormu-0.2.6.tar.gz", "has_sig": false, "md5_digest": "cc78b9dcece5e04e98dc9cbacf5139be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5047, "upload_time": "2014-11-24T08:39:24", "url": "https://files.pythonhosted.org/packages/16/67/b609c18bf985c9ee0212e45b8279438c61828652f6c681c64c898655947d/nozdormu-0.2.6.tar.gz" } ], "0.2.7": [ { "comment_text": "", "digests": { "md5": "a39db9c9a08f01d3607e63f73184fd72", "sha256": "760dcff9e0ed255c21775c67ee1aa48614949414607df9623e3c954baa14c9a9" }, "downloads": -1, "filename": "nozdormu-0.2.7.tar.gz", "has_sig": false, "md5_digest": "a39db9c9a08f01d3607e63f73184fd72", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5034, "upload_time": "2015-01-06T15:35:57", "url": "https://files.pythonhosted.org/packages/5e/f6/51854febaaaf5146b1877ca88f59b07c6f1b18b609312176c18dedcc604b/nozdormu-0.2.7.tar.gz" } ], "0.2.7.1": [ { "comment_text": "", "digests": { "md5": "f6720f7b601c828e662169ced4e5c7a0", "sha256": "51a3e1e2bd97b6cc3a83d4e74e74890cae6d82344260e83371e9ab40d279f727" }, "downloads": -1, "filename": "nozdormu-0.2.7.1.tar.gz", "has_sig": false, "md5_digest": "f6720f7b601c828e662169ced4e5c7a0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5066, "upload_time": "2015-01-06T15:43:58", "url": "https://files.pythonhosted.org/packages/c1/bd/400983042943892792996ea9611801e6e056951fc6afee2b297bfebc768d/nozdormu-0.2.7.1.tar.gz" } ], "0.3.2": [ { "comment_text": "", "digests": { "md5": "1ea4c5e09ad564a26637a0962e6a2ff0", "sha256": "8326bf8449d6b1723646f1d623776493e7541569d9d87abf9cc4bed569fe511e" }, "downloads": -1, "filename": "nozdormu-0.3.2.tar.gz", "has_sig": false, "md5_digest": "1ea4c5e09ad564a26637a0962e6a2ff0", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5117, "upload_time": "2015-04-26T07:30:05", "url": "https://files.pythonhosted.org/packages/35/1a/e15c9c457905c3d8b597fdcb49e8c1d937b51f9eb1b37749c74790dc0dd2/nozdormu-0.3.2.tar.gz" } ], "0.3.3": [ { "comment_text": "", "digests": { "md5": "d54681fa6d6a182f36ad053626a30fb2", "sha256": "0e59b602a7fdcce3f2296511c2bc73e30d99a770ef1626192c5a03dcd5e79d78" }, "downloads": -1, "filename": "nozdormu-0.3.3.tar.gz", "has_sig": false, "md5_digest": "d54681fa6d6a182f36ad053626a30fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2015-11-09T15:17:00", "url": "https://files.pythonhosted.org/packages/47/e5/e14e211a7e323b4b83a0cabdb58065856b92df45da8ee12c49a65aa4974a/nozdormu-0.3.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "d54681fa6d6a182f36ad053626a30fb2", "sha256": "0e59b602a7fdcce3f2296511c2bc73e30d99a770ef1626192c5a03dcd5e79d78" }, "downloads": -1, "filename": "nozdormu-0.3.3.tar.gz", "has_sig": false, "md5_digest": "d54681fa6d6a182f36ad053626a30fb2", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5224, "upload_time": "2015-11-09T15:17:00", "url": "https://files.pythonhosted.org/packages/47/e5/e14e211a7e323b4b83a0cabdb58065856b92df45da8ee12c49a65aa4974a/nozdormu-0.3.3.tar.gz" } ] }