measure-exec-time


Namemeasure-exec-time JSON
Version 0.10 PyPI version JSON
download
home_pagehttps://github.com/hansalemaos/measure_exec_time
SummaryDecorator for measuring the execution time of a callable
upload_time2022-12-29 13:38:48
maintainer
docs_urlNone
authorJohannes Fischer
requires_python
licenseMIT
keywords decorator measuring time
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            
# Decorator for measuring the execution time of a callable

```python

$pip install measure-exec-time
from measure_exec_time import measure_time
from time import sleep



@measure_time
def foo1():
    sleep(2)
    return 22





@measure_time(show_timedelta=False, show_start_end=True)
def foo2():
    sleep(2)
    return 22





@measure_time(show_timedelta=True, show_start_end=False)
def foo3():
    sleep(2)
    return 22


foo1()
print('----------')
foo2()
print('----------')
foo3()


    
```
<img src="https://github.com/hansalemaos/screenshots/raw/main/timemea.png"/>





            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/hansalemaos/measure_exec_time",
    "name": "measure-exec-time",
    "maintainer": "",
    "docs_url": null,
    "requires_python": "",
    "maintainer_email": "",
    "keywords": "decorator,measuring,time",
    "author": "Johannes Fischer",
    "author_email": "<aulasparticularesdealemaosp@gmail.com>",
    "download_url": "https://files.pythonhosted.org/packages/2c/4f/292fc339a6ef7f7c325143ff68743f402706dfd337c21d33db08903838ce/measure_exec_time-0.10.tar.gz",
    "platform": null,
    "description": "\n# Decorator for measuring the execution time of a callable\n\n```python\n\n$pip install measure-exec-time\nfrom measure_exec_time import measure_time\nfrom time import sleep\n\n\n\n@measure_time\ndef foo1():\n    sleep(2)\n    return 22\n\n\n\n\n\n@measure_time(show_timedelta=False, show_start_end=True)\ndef foo2():\n    sleep(2)\n    return 22\n\n\n\n\n\n@measure_time(show_timedelta=True, show_start_end=False)\ndef foo3():\n    sleep(2)\n    return 22\n\n\nfoo1()\nprint('----------')\nfoo2()\nprint('----------')\nfoo3()\n\n\n    \n```\n<img src=\"https://github.com/hansalemaos/screenshots/raw/main/timemea.png\"/>\n\n\n\n\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Decorator for measuring the execution time of a callable",
    "version": "0.10",
    "split_keywords": [
        "decorator",
        "measuring",
        "time"
    ],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "md5": "4d91aefdd4672731f495e8eb3cfa7b20",
                "sha256": "ef335c41d33002c82ec156ecae2dffd2e96462322eb2c7633911f993c9b1d746"
            },
            "downloads": -1,
            "filename": "measure_exec_time-0.10-py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "4d91aefdd4672731f495e8eb3cfa7b20",
            "packagetype": "bdist_wheel",
            "python_version": "py3",
            "requires_python": null,
            "size": 4640,
            "upload_time": "2022-12-29T13:38:46",
            "upload_time_iso_8601": "2022-12-29T13:38:46.772978Z",
            "url": "https://files.pythonhosted.org/packages/67/41/f66a9c55715972c11f016c36ae719838df23c9a381854cf9b3ff662f37e4/measure_exec_time-0.10-py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "md5": "b14340bb588db44c6bbc49ce117a6030",
                "sha256": "bedab9b1bb189f972447f7c2f018324c9d99e74ca0d3a1b1f893c4ef9e484374"
            },
            "downloads": -1,
            "filename": "measure_exec_time-0.10.tar.gz",
            "has_sig": false,
            "md5_digest": "b14340bb588db44c6bbc49ce117a6030",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3342,
            "upload_time": "2022-12-29T13:38:48",
            "upload_time_iso_8601": "2022-12-29T13:38:48.971328Z",
            "url": "https://files.pythonhosted.org/packages/2c/4f/292fc339a6ef7f7c325143ff68743f402706dfd337c21d33db08903838ce/measure_exec_time-0.10.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2022-12-29 13:38:48",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "github_user": "hansalemaos",
    "github_project": "measure_exec_time",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "requirements": [],
    "lcname": "measure-exec-time"
}
        
Elapsed time: 0.02735s