peasyprofiller


Namepeasyprofiller JSON
Version 0.4.0 PyPI version JSON
download
home_pagehttps://github.com/moraguma/peasyprofiller
SummaryEasy and simple profiller for Python
upload_time2024-09-12 18:28:55
maintainerNone
docs_urlNone
authorMoraguma
requires_pythonNone
licenseMIT
keywords
VCS
bugtrack_url
requirements No requirements were recorded.
Travis-CI No Travis.
coveralls test coverage No coveralls.
            # Peasy Profiller

This is a simple and easy-to-use profiller for Python applications that will generate CSV files that indicate the amount of time your application spent in different contexts

## Quickstart

To install, run

```bash
pip install --upgrade pip
pip install peasyprofiller
```

To use it in a program, import it, call the start function at the start of the section you want to profile and stop at the end of that section. Time of sections with the same context will be added.

To save the data collected, call the save_csv function with the desired save path. You can also call the plot function to create a graph of the relative time spent in each section (this assumes that all tracked sections are disjointed in time)


```python
from peasyprofiller.profiller import profiller as pprof

pprof.start("Name of my activity")

# Some processing happens here

pprof.stop("Name of my activity")
pprof.save_csv("path/to/save")
pprof.plot("path/to/save")
```

## Example

You can run the example at `peasyprofiller/tests/fibonacci.py` with the following command:

```
python -m peasyprofiller.tests.fibonacci <N> <SAVE_PATH>
```

The generated CSV should look like this:

```csv
Profiller,Fibonacci
6.87e-05,6.7745289
```

            

Raw data

            {
    "_id": null,
    "home_page": "https://github.com/moraguma/peasyprofiller",
    "name": "peasyprofiller",
    "maintainer": null,
    "docs_url": null,
    "requires_python": null,
    "maintainer_email": null,
    "keywords": null,
    "author": "Moraguma",
    "author_email": "g170603@dac.unicamp.br",
    "download_url": "https://files.pythonhosted.org/packages/7b/e3/e8d6566334e2bff41f130ddcb8b8c902cc1678568cd9f7f949a3166039a5/peasyprofiller-0.4.0.tar.gz",
    "platform": null,
    "description": "# Peasy Profiller\n\nThis is a simple and easy-to-use profiller for Python applications that will generate CSV files that indicate the amount of time your application spent in different contexts\n\n## Quickstart\n\nTo install, run\n\n```bash\npip install --upgrade pip\npip install peasyprofiller\n```\n\nTo use it in a program, import it, call the start function at the start of the section you want to profile and stop at the end of that section. Time of sections with the same context will be added.\n\nTo save the data collected, call the save_csv function with the desired save path. You can also call the plot function to create a graph of the relative time spent in each section (this assumes that all tracked sections are disjointed in time)\n\n\n```python\nfrom peasyprofiller.profiller import profiller as pprof\n\npprof.start(\"Name of my activity\")\n\n# Some processing happens here\n\npprof.stop(\"Name of my activity\")\npprof.save_csv(\"path/to/save\")\npprof.plot(\"path/to/save\")\n```\n\n## Example\n\nYou can run the example at `peasyprofiller/tests/fibonacci.py` with the following command:\n\n```\npython -m peasyprofiller.tests.fibonacci <N> <SAVE_PATH>\n```\n\nThe generated CSV should look like this:\n\n```csv\nProfiller,Fibonacci\n6.87e-05,6.7745289\n```\n",
    "bugtrack_url": null,
    "license": "MIT",
    "summary": "Easy and simple profiller for Python",
    "version": "0.4.0",
    "project_urls": {
        "Homepage": "https://github.com/moraguma/peasyprofiller"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "45db474ce5b935e072ec7eebb695c08cc0556a5e1c47895c3e48ec1f35019c6a",
                "md5": "9e80c7fde239fd501d2f5a969774ab86",
                "sha256": "518852fd4b089f90a81a72549549ee0b43a15e05b2209af86479d7ab0b0cf268"
            },
            "downloads": -1,
            "filename": "peasyprofiller-0.4.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "9e80c7fde239fd501d2f5a969774ab86",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 9550,
            "upload_time": "2024-09-12T18:28:53",
            "upload_time_iso_8601": "2024-09-12T18:28:53.936285Z",
            "url": "https://files.pythonhosted.org/packages/45/db/474ce5b935e072ec7eebb695c08cc0556a5e1c47895c3e48ec1f35019c6a/peasyprofiller-0.4.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "7be3e8d6566334e2bff41f130ddcb8b8c902cc1678568cd9f7f949a3166039a5",
                "md5": "3dde47ad737fcaf7d4136b5b3ece9a87",
                "sha256": "c9bf8d272ce4fc55d6429d188720a6de40c86b2f56b89f4af55b8d1a0f303d51"
            },
            "downloads": -1,
            "filename": "peasyprofiller-0.4.0.tar.gz",
            "has_sig": false,
            "md5_digest": "3dde47ad737fcaf7d4136b5b3ece9a87",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 3879,
            "upload_time": "2024-09-12T18:28:55",
            "upload_time_iso_8601": "2024-09-12T18:28:55.538005Z",
            "url": "https://files.pythonhosted.org/packages/7b/e3/e8d6566334e2bff41f130ddcb8b8c902cc1678568cd9f7f949a3166039a5/peasyprofiller-0.4.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-09-12 18:28:55",
    "github": true,
    "gitlab": false,
    "bitbucket": false,
    "codeberg": false,
    "github_user": "moraguma",
    "github_project": "peasyprofiller",
    "travis_ci": false,
    "coveralls": false,
    "github_actions": false,
    "lcname": "peasyprofiller"
}
        
Elapsed time: 0.37613s