{ "info": { "author": "Nollde", "author_email": "", "bugtrack_url": null, "classifiers": [ "License :: OSI Approved :: MIT License", "Operating System :: OS Independent", "Programming Language :: Python :: 3" ], "description": "# Timeship\n\nThe timeship lets you easily and transparently time execution times within your python code.\n\nIts concept is that you set anchors in your code specifying timing routes. The timeship module will time the specified routes and transparently inform you about their execution time.\n\n## installation\nTimeship can be installed using `pip` via:\n```bash\npip install timeship\n```\n\n## demo\nSimply execute the following python snippet to see the timeship on sea!\n```python\nimport time\nfrom timeship import timeship\n\n\nwith timeship.Anchor(\"BuildShip\"):\n with timeship.Anchor(\"CollectMaterial\"):\n time.sleep(0.2)\n with timeship.Anchor(\"CarftHull\"):\n time.sleep(0.3)\n with timeship.Anchor(\"CraftMast\"):\n time.sleep(0.4)\n with timeship.Anchor(\"HoistSail\"):\n time.sleep(0.1)\n\nwith timeship.Anchor(\"Sail\"):\n time.sleep(0.6)\n\ntimeship.plot(\"timeship_demo\")\n\n```\n\n## usage\nYou have two basic different options to set anchors\n\n### the anchor function\nThe fist option is using timeships anchor function as follows:\n```python\n# set anchor Arrr\ntimeship.anchor(\"Arrr\")\n# execute code\ntime.sleep(0.1)\n# release anchor Arrr\ntimeship.anchor(\"Arrr\", release=True)\n\n# set anchor Orrr\ntimeship.anchor(\"Orrr\")\n# execute some code\ntime.sleep(0.4)\n# additionally set anchor Errr\ntimeship.anchor(\"Errr\")\n# execute some other code\ntime.sleep(0.4)\n# release all active anchors by not specifying a name\ntimeship.anchor()\n```\n\n### contexts\nThe second option is to use contexts\n\n```python\nwith timeship.Anchor(\"setup\"):\n time.sleep(0.1)\n```\n\n### nesting\nThe timeship also supports nested contexts.\nNested timing context can be specified using a slashy (`context/subcontext`) notation:\n```python\ntimeship.anchor(\"xdata/load\")\ntime.sleep(0.1)\ntimeship.anchor()\ntimeship.anchor(\"xdata/augment\")\n```\n\nor by nesting contexts:\n```python\nwith timeship.Anchor(\"ydata\"):\n with timeship.Anchor(\"load\"):\n # execute ydata loading code\n time.sleep(0.2)\n with timeship.Anchor(\"augment\"):\n # execute ydata augmentation code\n time.sleep(0.3)\n```\n\nor equivalently:\n```python\nwith timeship.Anchor(\"zdata/load\"):\n # execute zdata loading code\n time.sleep(0.2)\nwith timeship.Anchor(\"zdata/augment\"):\n # execute zdata augmentation code\n time.sleep(0.3)\n```\n\n## plotting timing data\nAt the end of your code, plot the results by by using the `plot` function. Timeships plotting function (`timeship.plot()`) creates a directory (specified by the `dir` argument) with an index.html containing a d3 plot with the timing data which can be viewed through a webbrowser.\n\n```python\ntimeship.plot(dir=\"timeship\")\n```\nThis will create a new directory (in this case called \"timeship\") and store an html page, which contains a clear visualization of the timing data.\n\nSail on through space and time, Arrr!\n\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://git.rwth-aachen.de/dennis.noll/timeship.git", "keywords": "", "license": "", "maintainer": "", "maintainer_email": "", "name": "timeship", "package_url": "https://pypi.org/project/timeship/", "platform": "", "project_url": "https://pypi.org/project/timeship/", "project_urls": { "Homepage": "https://git.rwth-aachen.de/dennis.noll/timeship.git" }, "release_url": "https://pypi.org/project/timeship/1.0.1/", "requires_dist": [ "numpy" ], "requires_python": "", "summary": "Easy timing of all kinds of python code.", "version": "1.0.1" }, "last_serial": 5729558, "releases": { "0.0.1": [ { "comment_text": "", "digests": { "md5": "d9b1e10a71401fce8dea384fa15d3a94", "sha256": "7dba60a05658485540285f054d71d28bc91f6a8b4d8c3c46d28ffa16a34971eb" }, "downloads": -1, "filename": "timeship-0.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "d9b1e10a71401fce8dea384fa15d3a94", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 2017, "upload_time": "2019-08-20T15:37:57", "url": "https://files.pythonhosted.org/packages/a4/2a/8a02c6d2402527953ba186559dda9135f3f6e3104e1665dacaa0335c6ed5/timeship-0.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "14fa83c9a63f68079562ff2901e4b95e", "sha256": "8ca18ed173600aa79225ae1062091cd272669804dc2dde0d7d312f19872656ee" }, "downloads": -1, "filename": "timeship-0.0.1.tar.gz", "has_sig": false, "md5_digest": "14fa83c9a63f68079562ff2901e4b95e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 987, "upload_time": "2019-08-20T15:37:59", "url": "https://files.pythonhosted.org/packages/7d/cf/d569c994d194c8a4844210b32a228dffd10a50e19e381f40bb566fb0cbf2/timeship-0.0.1.tar.gz" } ], "1.0.1": [ { "comment_text": "", "digests": { "md5": "55b4448fa49a2f9466d4066868174ad5", "sha256": "2634f48524c5d84416df35059f9644b32c6c62f1e010daf10cd3f3470e74eb96" }, "downloads": -1, "filename": "timeship-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "55b4448fa49a2f9466d4066868174ad5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7116, "upload_time": "2019-08-26T08:18:16", "url": "https://files.pythonhosted.org/packages/39/ef/3e6722feb94c2b3974aaad7f8481438b33a9666cddb35a2d2fd686610ce0/timeship-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47d5ac267fada91fc6e90b88f7963e36", "sha256": "737c9f406c6fa6243857b670e23493430656a039ce00fc15559c3e97e54f69e8" }, "downloads": -1, "filename": "timeship-1.0.1.tar.gz", "has_sig": false, "md5_digest": "47d5ac267fada91fc6e90b88f7963e36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4804, "upload_time": "2019-08-26T08:18:17", "url": "https://files.pythonhosted.org/packages/80/00/51f705a32bfbf5cda326cce3031790aad69e2e6256e7d005a55468d5d4f5/timeship-1.0.1.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "55b4448fa49a2f9466d4066868174ad5", "sha256": "2634f48524c5d84416df35059f9644b32c6c62f1e010daf10cd3f3470e74eb96" }, "downloads": -1, "filename": "timeship-1.0.1-py3-none-any.whl", "has_sig": false, "md5_digest": "55b4448fa49a2f9466d4066868174ad5", "packagetype": "bdist_wheel", "python_version": "py3", "requires_python": null, "size": 7116, "upload_time": "2019-08-26T08:18:16", "url": "https://files.pythonhosted.org/packages/39/ef/3e6722feb94c2b3974aaad7f8481438b33a9666cddb35a2d2fd686610ce0/timeship-1.0.1-py3-none-any.whl" }, { "comment_text": "", "digests": { "md5": "47d5ac267fada91fc6e90b88f7963e36", "sha256": "737c9f406c6fa6243857b670e23493430656a039ce00fc15559c3e97e54f69e8" }, "downloads": -1, "filename": "timeship-1.0.1.tar.gz", "has_sig": false, "md5_digest": "47d5ac267fada91fc6e90b88f7963e36", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 4804, "upload_time": "2019-08-26T08:18:17", "url": "https://files.pythonhosted.org/packages/80/00/51f705a32bfbf5cda326cce3031790aad69e2e6256e7d005a55468d5d4f5/timeship-1.0.1.tar.gz" } ] }