{ "info": { "author": "Jonas Grimfelt", "author_email": "grimen@gmail.com", "bugtrack_url": null, "classifiers": [ "Development Status :: 5 - Production/Stable", "Intended Audience :: Developers", "License :: OSI Approved :: MIT License", "Operating System :: POSIX", "Programming Language :: Python", "Programming Language :: Python :: 2", "Programming Language :: Python :: 2.7", "Programming Language :: Python :: 3", "Programming Language :: Python :: 3.6", "Programming Language :: Python :: Implementation :: CPython", "Programming Language :: Python :: Implementation :: PyPy", "Topic :: Software Development :: Libraries" ], "description": "\n# `totalrecall` [![PyPI version](https://badge.fury.io/py/totalrecall.svg)](https://badge.fury.io/py/totalrecall) [![Build Status](https://travis-ci.com/grimen/python-totalrecall.svg?branch=master)](https://travis-ci.com/grimen/python-totalrecall) [![Coverage Status](https://codecov.io/gh/grimen/python-totalrecall/branch/master/graph/badge.svg)](https://codecov.io/gh/grimen/python-totalrecall)\n\n*A runtime step profiler - for Python.*\n\n## Introduction\n\nAggregating runtime statistics and/or finding bottlenecks in code is one of the most common challenges as a software engineer. This is a library to aid that. In comparison to most existing libraries this one is focused on **step profiling**; aggregation of runtime information in steps marked by keys/tags/labels and optional meta data, which is used to create a summary of all steps in form of a transaction. As a bonus it also supports decorating code **contexts** and **functions**.\n\nThis is an **MVP** that most likely will be extended with more profiling features.\n\n\n## Install\n\nInstall using **pip**:\n\n```sh\n$ pip install totalrecall\n```\n\n\n## Use\n\nVery basic **[example](https://github.com/grimen/python-totalrecall/tree/master/examples/basic.py)**:\n\n```python\nimport totalrecall\n\nfrom time import sleep\n\n# ---------------------------------------------------\n# EXAMPLE: runtime step profiler\n# ------------------------------------------------\n\nprofiler = totalrecall.timer('profile something - using timer', begin = False)\n\nprofiler.begin('task 1')\n\nsleep(0.1)\n\nprofiler.begin('task 2')\n\nsleep(0.2)\n\nprofiler.begin('task 3')\n\nsleep(0.3)\n\nprofiler.end()\n\nprint('[profiler.time / basic]: TIME: {0}'.format(profiler.time))\nprint('[profiler.time / basic]: STEPS: {0}'.format(profiler.steps))\n\n# ---------------------------------------------------\n# EXAMPLE: runtime step profiler (detailed)\n# ------------------------------------------------\n\nprofiler = totalrecall.timer('profile something - using timer',\n begin = False,\n enabled = True,\n verbose = True,\n colors = True,\n)\n\nprofiler.begin('task 1')\n\nsleep(0.1)\n\nprofiler.begin('task 2')\n\nsleep(0.2)\n\nprofiler.begin('task 3')\n\nsleep(0.3)\n\nprofiler.end()\n\nprint('[profiler.time / detailed]: TIME: {0}'.format(profiler.time))\nprint('[profiler.time / detailed]: STEPS: {0}'.format(profiler.steps))\n\n\n# ---------------------------------------------------\n# EXAMPLE: runtime context profiler\n# ------------------------------------------------\n\nprofiler = totalrecall.context('profile something 2 - using context')\n\nwith profiler:\n sleep(1)\n\nprint('[profiler.context / basic]: TIME: {0}'.format(profiler.time))\nprint('[profiler.context / basic]: STEPS: {0}'.format(profiler.steps))\n\n\n# ---------------------------------------------------\n# EXAMPLE: runtime function profiler\n# ------------------------------------------------\n\nprofiler = totalrecall.function('profile something 2 - using context')\n\n@profiler\ndef foo():\n sleep(1)\n\nprint('[profiler.function / basic]: TIME: {0}'.format(profiler.time))\nprint('[profiler.function / basic]: STEPS: {0}'.format(profiler.steps))\n\n```\n\n\n## Test\n\nClone down source code:\n\n```sh\n$ make install\n```\n\nRun **colorful tests**, with only native environment (dependency sandboxing up to you):\n\n```sh\n$ make test\n```\n\nRun **less colorful tests**, with **multi-environment** (using **tox**):\n\n```sh\n$ make test-tox\n```\n\n\n## About\n\nThis project was mainly initiated - in lack of solid existing alternatives - to be used at our work at **[Markable.ai](https://markable.ai)** to have common code conventions between various programming environments where **Python** (research, CV, AI) is heavily used.\n\n\n## Credits\n\nThanks to **[op-bk](https://github.com/op-bk)** for creative help with naming this library.\n\n\n## License\n\nReleased under the MIT license.\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "https://github.com/grimen/python-totalrecall", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/grimen/python-totalrecall", "keywords": "profiler,step-profiler,step-runtime-profiler,runtime-profiler,runtime,step,timer,context,function,mixin", "license": "MIT", "maintainer": "", "maintainer_email": "", "name": "totalrecall", "package_url": "https://pypi.org/project/totalrecall/", "platform": "", "project_url": "https://pypi.org/project/totalrecall/", "project_urls": { "Download": "https://github.com/grimen/python-totalrecall", "Homepage": "https://github.com/grimen/python-totalrecall", "bugs": "https://github.com/grimen/python-totalrecall/issues", "repository": "https://github.com/grimen/python-totalrecall" }, "release_url": "https://pypi.org/project/totalrecall/0.1.1/", "requires_dist": [ "six (>=1.11.0)", "rootpath (>=0.1.0)", "mybad (>=0.1.0)", "mybase (>=0.1.0)", "inspecta (>=0.1.0)", "attributedict (>=0.2.0)", "uuid (>=1.3)", "colour-runner (>=0.0.5)", "deepdiff (>=3.3.0)", "tox (>=3.0.0)", "coverage (>=4.5.2)", "codecov (>=2.0.15)" ], "requires_python": "", "summary": "A runtime step profiler - for Python.", "version": "0.1.1" }, "last_serial": 4921075, "releases": { "0.1.0": [ { "comment_text": "", "digests": { "md5": "f98dba28cd83dffadf9acd2648aaef34", "sha256": "7985ff4f2a0f8670c4f12f993ee9046efde1b5638800573c0a6fba91152909e6" }, "downloads": -1, "filename": "totalrecall-0.1.0-py3-none-any.whl", "has_sig": false, "md5_digest": "f98dba28cd83dffadf9acd2648aaef34", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9020, "upload_time": "2019-01-28T11:32:20", "url": "https://files.pythonhosted.org/packages/cf/f3/874632c48457fde5f1d287c826879a7f8d97c12435641ecf320e9c016def/totalrecall-0.1.0-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "355544b442a9f37d63f1f0f045ea4ddb", "sha256": "05e24110cc957db5fbd5b0099bd20f46028aba7d8816264acb83e1cc4281d297" }, "downloads": -1, "filename": "totalrecall-0.1.0.tar.gz", "has_sig": false, "md5_digest": "355544b442a9f37d63f1f0f045ea4ddb", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12858, "upload_time": "2019-01-28T11:32:21", "url": "https://files.pythonhosted.org/packages/38/d1/a99e418be17c4af405ec63984773dc64a20903f330a00a644654fec4193a/totalrecall-0.1.0.tar.gz" } ], "0.1.1": [ { "comment_text": "", "digests": { "md5": "c03ad4b537133b0c6b23cb510b87f5fe", "sha256": "b9022c42a6cc3694633694d214a0a19f84883c5f9e9496f7c01c96cd45dd6544" }, "downloads": -1, "filename": "totalrecall-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c03ad4b537133b0c6b23cb510b87f5fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9085, "upload_time": "2019-03-10T11:24:46", "url": "https://files.pythonhosted.org/packages/6c/4e/d46a32373c60abce757882e86ac6bf6b74b0b452ded6ca251dc73e3c9bbb/totalrecall-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c249230adb8ae77cf98d1f79b97c486c", "sha256": "fe83724bf56474973d8d8623d24125be0669e64c996e8deb2b8faaa3838924b7" }, "downloads": -1, "filename": "totalrecall-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c249230adb8ae77cf98d1f79b97c486c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13211, "upload_time": "2019-03-10T11:24:48", "url": "https://files.pythonhosted.org/packages/e6/1b/cdb0f397920a54d2e50a7cf0ca761b08a40bf0034484809ab17c5255082a/totalrecall-0.1.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "c03ad4b537133b0c6b23cb510b87f5fe", "sha256": "b9022c42a6cc3694633694d214a0a19f84883c5f9e9496f7c01c96cd45dd6544" }, "downloads": -1, "filename": "totalrecall-0.1.1-py3-none-any.whl", "has_sig": false, "md5_digest": "c03ad4b537133b0c6b23cb510b87f5fe", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 9085, "upload_time": "2019-03-10T11:24:46", "url": "https://files.pythonhosted.org/packages/6c/4e/d46a32373c60abce757882e86ac6bf6b74b0b452ded6ca251dc73e3c9bbb/totalrecall-0.1.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "c249230adb8ae77cf98d1f79b97c486c", "sha256": "fe83724bf56474973d8d8623d24125be0669e64c996e8deb2b8faaa3838924b7" }, "downloads": -1, "filename": "totalrecall-0.1.1.tar.gz", "has_sig": false, "md5_digest": "c249230adb8ae77cf98d1f79b97c486c", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13211, "upload_time": "2019-03-10T11:24:48", "url": "https://files.pythonhosted.org/packages/e6/1b/cdb0f397920a54d2e50a7cf0ca761b08a40bf0034484809ab17c5255082a/totalrecall-0.1.1.tar.gz" } ] }