{ "info": { "author": "Aaron Gallagher", "author_email": "_@habnab.it", "bugtrack_url": null, "classifiers": [ "Development Status :: 2 - Pre-Alpha", "Framework :: Twisted", "Intended Audience :: Developers", "License :: OSI Approved :: ISC License (ISCL)", "Operating System :: OS Independent", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.6", "Programming Language :: Python :: 2.7", "Topic :: Software Development" ], "description": ".. image:: https://travis-ci.org/flowroute/twisted-theseus.png\n\n\n=================\n twisted-theseus\n=================\n\nA Deferred_-aware profiler for Python code.\n\nWhile cProfile_ is a very useful utility,\nit is limited to recording *synchronous* execution time.\nA function that returns a Deferred will typically return very quickly,\nwhile the Deferred it returns might not fire for seconds or even minutes.\nThis is where theseus comes in:\nany function that returns a Deferred will be tracked by theseus.\nThe time from when the Deferred was returned to when it fired will be measured,\nand recorded along with the function's call stack.\n\n\nUsage\n=====\n\nThe public interface of theseus is a class called ``Tracer``.\nTo get started::\n\n from theseus import Tracer\n t = Tracer()\n t.install()\n\nThis is enough to start tracing execution.\nEventually, the statistics will have to be written to disk::\n\n with open('callgrind.theseus', 'wb') as outfile:\n t.write_data(outfile)\n\nThe output is written in `callgrind format`_,\nwhich means that standard tools can be used to interpret the results,\nsuch as kcachegrind_.\n\nIf at any point the ``Tracer`` is no longer useful,\nit can be uninstalled to stop tracing::\n\n t.uninstall()\n\nAdditionally,\ntheseus is aware of inlineCallbacks_,\nand will rewrite call stacks to make them look \"correct\".\nFor example,\ngiven this code::\n\n from twisted.internet import defer, task\n\n @defer.inlineCallbacks\n def func(reactor):\n yield task.deferLater(reactor, 1, lambda: None)\n\n task.react(func)\n\nThe call stack according to theseus will look like this (most recent call last)::\n\n __main__ in \n twisted.internet.task in react\n __main__ in func\n\nWhile theseus and cProfile both use a `profile hook`_,\nas long as cProfile is installed first,\nboth profilers can be used at the same time.\nIn this case,\ncalling ``uninstall()`` will restore cProfile.\n\n\n.. _Deferred: https://twistedmatrix.com/documents/current/core/howto/defer.html\n.. _cProfile: https://docs.python.org/2/library/profile.html\n.. _callgrind format: http://valgrind.org/docs/manual/cl-format.html\n.. _kcachegrind: http://kcachegrind.sourceforge.net/html/Home.html\n.. _inlineCallbacks: http://twistedmatrix.com/documents/current/api/twisted.internet.defer.html#inlineCallbacks\n.. _profile hook: https://docs.python.org/2/library/sys.html#sys.setprofile", "description_content_type": null, "docs_url": null, "download_url": null, "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/flowroute/twisted-theseus", "keywords": null, "license": "ISC", "maintainer": null, "maintainer_email": null, "name": "twisted-theseus", "package_url": "https://pypi.org/project/twisted-theseus/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/twisted-theseus/", "project_urls": { "Homepage": "https://github.com/flowroute/twisted-theseus" }, "release_url": "https://pypi.org/project/twisted-theseus/0.14.1.3/", "requires_dist": null, "requires_python": null, "summary": "a Deferred-aware profiler for Twisted", "version": "0.14.1.3" }, "last_serial": 1792385, "releases": { "0.14.0.0": [ { "comment_text": "", "digests": { "md5": "b43d60d9e5111b54b1edca62fc5b063c", "sha256": "4b40397aced1d81d9401083753a648355f81bcbab6ac1e32b129f50f34b13bb6" }, "downloads": -1, "filename": "twisted-theseus-0.14.0.0.tar.gz", "has_sig": false, "md5_digest": "b43d60d9e5111b54b1edca62fc5b063c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5949, "upload_time": "2014-11-18T02:58:48", "url": "https://files.pythonhosted.org/packages/27/03/d681ec2d98cddb2176afbae7231b7496b3e01d73e8deb23317ab0f0bcd40/twisted-theseus-0.14.0.0.tar.gz" } ], "0.14.0.0a1.post3": [], "0.14.1.2": [ { "comment_text": "", "digests": { "md5": "dcc24420689d38415c5530af4bf5e6d8", "sha256": "726d85a2f3a960dd912a84454492461e6aefa2b907b47fb0e8c4bf0d089623b8" }, "downloads": -1, "filename": "twisted-theseus-0.14.1.2.tar.gz", "has_sig": false, "md5_digest": "dcc24420689d38415c5530af4bf5e6d8", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 29226, "upload_time": "2014-11-20T23:01:41", "url": "https://files.pythonhosted.org/packages/a3/e7/5e66dc960b27e6c07774a407684c041a64f37c5c582cbc0da74851828860/twisted-theseus-0.14.1.2.tar.gz" } ], "0.14.1.3": [ { "comment_text": "", "digests": { "md5": "0d52f7274212df36fce6b5b322068b41", "sha256": "7edc3fb7e58d3707c51d786d8acb5b305b7bc3a11d3b00347608a30ee7b814a1" }, "downloads": -1, "filename": "twisted_theseus-0.14.1.3-pp27-none-any.whl", "has_sig": false, "md5_digest": "0d52f7274212df36fce6b5b322068b41", "packagetype": "bdist_wheel", "python_version": "pp27", "requires_python": null, "size": 9304, "upload_time": "2015-10-29T19:50:53", "url": "https://files.pythonhosted.org/packages/26/8c/ef08bbf40321616c7ca39f240d7d9d2187d7582fc95ed51da466a46afe45/twisted_theseus-0.14.1.3-pp27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "468a0f5244d914acf83ab08aa3633a28", "sha256": "3b512afe228ebd60bc25a2a37c45bef97dd998306ccb8d4afb954b5c50f3ff74" }, "downloads": -1, "filename": "twisted-theseus-0.14.1.3.tar.gz", "has_sig": false, "md5_digest": "468a0f5244d914acf83ab08aa3633a28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28905, "upload_time": "2015-10-29T19:50:48", "url": "https://files.pythonhosted.org/packages/53/22/ae90b006419b6d7a0503d98fa3d0be5e3677a2e8906089b737de48d66f9c/twisted-theseus-0.14.1.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d52f7274212df36fce6b5b322068b41", "sha256": "7edc3fb7e58d3707c51d786d8acb5b305b7bc3a11d3b00347608a30ee7b814a1" }, "downloads": -1, "filename": "twisted_theseus-0.14.1.3-pp27-none-any.whl", "has_sig": false, "md5_digest": "0d52f7274212df36fce6b5b322068b41", "packagetype": "bdist_wheel", "python_version": "pp27", "requires_python": null, "size": 9304, "upload_time": "2015-10-29T19:50:53", "url": "https://files.pythonhosted.org/packages/26/8c/ef08bbf40321616c7ca39f240d7d9d2187d7582fc95ed51da466a46afe45/twisted_theseus-0.14.1.3-pp27-none-any.whl" }, { "comment_text": "", "digests": { "md5": "468a0f5244d914acf83ab08aa3633a28", "sha256": "3b512afe228ebd60bc25a2a37c45bef97dd998306ccb8d4afb954b5c50f3ff74" }, "downloads": -1, "filename": "twisted-theseus-0.14.1.3.tar.gz", "has_sig": false, "md5_digest": "468a0f5244d914acf83ab08aa3633a28", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 28905, "upload_time": "2015-10-29T19:50:48", "url": "https://files.pythonhosted.org/packages/53/22/ae90b006419b6d7a0503d98fa3d0be5e3677a2e8906089b737de48d66f9c/twisted-theseus-0.14.1.3.tar.gz" } ] }