{ "info": { "author": "Gleb Sakhnov", "author_email": "gleb.sakhnov@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.4", "Programming Language :: Python :: 3.5", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Topic :: Software Development :: Build Tools" ], "description": "# perfy\nPerfy - a lightweight profiling tool for Python\n\nMark your functions and methods as trace-enabled with **@perfy** decorator:\n```python\n@perfy\ndef trace_this_function():\n # do something\n```\nAlso, you can trace arbitrary blocks of your code using **with** statement:\n```python\nwith perfy('name of your choice'):\n # your code here\n```\n\nAfter running your code, print report using\n```python\nperfy.report()\n```\n\n## Example:\n```python\nfrom time import sleep\nfrom perfy import perfy\n\n@perfy # <-- use decorator to track function calls\ndef func_sleep():\n sleep(.02)\n \n\ndef sleep_loop():\n with perfy('sleep loop'): # <-- use with-statement to track arbitrary block of code\n for _ in range(10):\n func_sleep()\n\n# you can nest with-blocks and decorated function calls in any order:\n@perfy # <-- a decorator on a top level function\ndef main():\n sleep_loop() # <-- this functions has a traced block inside\n\n with perfy('custom named block'): # <-- traced block\n sleep(.1)\n\n with perfy('inner block'): # <-- nested traced block\n func_sleep()\n func_sleep() \n```\nFor above code perfy.report() will output:\n```\n----------------------------------Perfy report----------------------------------\n Function/Method Time(sec.) Calls(count) \n--------------------------------------------------------------------------------\nmain 0.350 1 \n \u2514 sleep loop 0.206 1 \n \u2514 func_sleep 0.205 10 \n \u2514 custom named block 0.144 1 \n \u2514 inner block 0.043 1 \n \u2514 func_sleep 0.042 2 \n--------------------------------------------------------------------------------\n```", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/glebarez/perfy", "keywords": "profiling,trace,runtime,analysis", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "perfy", "package_url": "https://pypi.org/project/perfy/", "platform": "", "project_url": "https://pypi.org/project/perfy/", "project_urls": { "Homepage": "https://github.com/glebarez/perfy" }, "release_url": "https://pypi.org/project/perfy/0.27/", "requires_dist": null, "requires_python": ">=3.2", "summary": "Perfy - a lightweight performance tracer for python", "version": "0.27" }, "last_serial": 5383259, "releases": { "0.24": [ { "comment_text": "", "digests": { "md5": "1a50fa6e5280eda1b01397597f2f7f15", "sha256": "d4eac1352290d44a10274f8e96345dad60388fe8ecf87ddcc9c69d8dd26c34c9" }, "downloads": -1, "filename": "perfy-0.24.tar.gz", "has_sig": false, "md5_digest": "1a50fa6e5280eda1b01397597f2f7f15", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 2008, "upload_time": "2019-06-08T18:15:45", "url": "https://files.pythonhosted.org/packages/8b/99/debb8677690f867679059bdb51606a5e97594a4480c0952ba0bbfa6ecae7/perfy-0.24.tar.gz" } ], "0.25": [ { "comment_text": "", "digests": { "md5": "9e5113f35d7335ca30daa2a5eada05ae", "sha256": "f9368cef7fa31cc2253752c8e10ba14301ec706614a65132017bb09d059edf9c" }, "downloads": -1, "filename": "perfy-0.25.tar.gz", "has_sig": false, "md5_digest": "9e5113f35d7335ca30daa2a5eada05ae", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 3056, "upload_time": "2019-06-09T09:23:37", "url": "https://files.pythonhosted.org/packages/85/ea/e0d80050cc5fbbfebba7f5f9db6cc353ca3b5fb4226b4a5718cfd724acfb/perfy-0.25.tar.gz" } ], "0.26": [ { "comment_text": "", "digests": { "md5": "dcc9204786588bbaf2933cf3427e8c78", "sha256": "f4d4b9a20a9b5a86c72e801043e9cd40f31e35a1a7d61f5100d580dc70a59ad1" }, "downloads": -1, "filename": "perfy-0.26.tar.gz", "has_sig": false, "md5_digest": "dcc9204786588bbaf2933cf3427e8c78", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 3090, "upload_time": "2019-06-09T11:14:44", "url": "https://files.pythonhosted.org/packages/d1/3a/3c179d21c9a0a2586fce901ff4766bbda51c48c5cceebf77a2e837e80c76/perfy-0.26.tar.gz" } ], "0.27": [ { "comment_text": "", "digests": { "md5": "0d706552546422c750e79f7c8c33dbbe", "sha256": "633e27054433aab445bb95d4726714fcf688da12c63c0b5ff0bb5155be79cdd0" }, "downloads": -1, "filename": "perfy-0.27.tar.gz", "has_sig": false, "md5_digest": "0d706552546422c750e79f7c8c33dbbe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 3093, "upload_time": "2019-06-10T19:54:21", "url": "https://files.pythonhosted.org/packages/a3/ed/9ec8600948de5142618d6ad3f3ff22a72190e89ae59ec496c3dd119659f4/perfy-0.27.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0d706552546422c750e79f7c8c33dbbe", "sha256": "633e27054433aab445bb95d4726714fcf688da12c63c0b5ff0bb5155be79cdd0" }, "downloads": -1, "filename": "perfy-0.27.tar.gz", "has_sig": false, "md5_digest": "0d706552546422c750e79f7c8c33dbbe", "packagetype": "sdist", "python_version": "source", "requires_python": ">=3.2", "size": 3093, "upload_time": "2019-06-10T19:54:21", "url": "https://files.pythonhosted.org/packages/a3/ed/9ec8600948de5142618d6ad3f3ff22a72190e89ae59ec496c3dd119659f4/perfy-0.27.tar.gz" } ] }