peasyprofiller


Namepeasyprofiller JSON
Version 0.5.0 PyPI version JSON
download
home_pagehttps://github.com/moraguma/peasyprofiller
SummaryEasy and simple profiller for Python
upload_time2024-10-13 18:57:53
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/43/ab/f086eff20384b9a0071be0abeb52475cd4612fdb9348234bb575cab446d8/peasyprofiller-0.5.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.5.0",
    "project_urls": {
        "Homepage": "https://github.com/moraguma/peasyprofiller"
    },
    "split_keywords": [],
    "urls": [
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "a7c057b15e1a9481a00c010cda6e22bd49b007a78269dd696f971c6c19f79fc3",
                "md5": "69c69531e841be5f45c0fcd47e873441",
                "sha256": "0d2e8c68f41940cb0d30461b9fa7cd42891812c8bff9bdaa31304c442dbee839"
            },
            "downloads": -1,
            "filename": "peasyprofiller-0.5.0-py2.py3-none-any.whl",
            "has_sig": false,
            "md5_digest": "69c69531e841be5f45c0fcd47e873441",
            "packagetype": "bdist_wheel",
            "python_version": "py2.py3",
            "requires_python": null,
            "size": 18503,
            "upload_time": "2024-10-13T18:57:51",
            "upload_time_iso_8601": "2024-10-13T18:57:51.623688Z",
            "url": "https://files.pythonhosted.org/packages/a7/c0/57b15e1a9481a00c010cda6e22bd49b007a78269dd696f971c6c19f79fc3/peasyprofiller-0.5.0-py2.py3-none-any.whl",
            "yanked": false,
            "yanked_reason": null
        },
        {
            "comment_text": "",
            "digests": {
                "blake2b_256": "43abf086eff20384b9a0071be0abeb52475cd4612fdb9348234bb575cab446d8",
                "md5": "d9e7887ea0ce71458fb78fb08fcd2758",
                "sha256": "f9490665e29fb861af08c2f632a0acb3d5e76fc7023668de1150712c5f6f3a52"
            },
            "downloads": -1,
            "filename": "peasyprofiller-0.5.0.tar.gz",
            "has_sig": false,
            "md5_digest": "d9e7887ea0ce71458fb78fb08fcd2758",
            "packagetype": "sdist",
            "python_version": "source",
            "requires_python": null,
            "size": 4023,
            "upload_time": "2024-10-13T18:57:53",
            "upload_time_iso_8601": "2024-10-13T18:57:53.284012Z",
            "url": "https://files.pythonhosted.org/packages/43/ab/f086eff20384b9a0071be0abeb52475cd4612fdb9348234bb575cab446d8/peasyprofiller-0.5.0.tar.gz",
            "yanked": false,
            "yanked_reason": null
        }
    ],
    "upload_time": "2024-10-13 18:57:53",
    "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.45376s