Add to pstats library of cProfile the feature of get the result in a list with filters, limit and sort.
Project description
=================
pstats_print2list
=================
.. image:: https://img.shields.io/pypi/v/pstats_print2list.svg
:target: https://pypi.python.org/pypi/pstats_print2list
.. image:: https://img.shields.io/travis/Vauxoo/pstats-print2list.svg
:target: https://travis-ci.org/Vauxoo/pstats-print2list
.. .. image:: https://readthedocs.org/projects/pstats_print2list/badge/?version=latest
.. :target: https://readthedocs.org/projects/pstats_print2list/?badge=latest
.. :alt: Documentation Status
.. image:: https://coveralls.io/repos/github/Vauxoo/pstats-print2list/badge.svg?branch=master
:target: https://coveralls.io/github/Vauxoo/pstats-print2list?branch=master
.. image:: https://img.shields.io/pypi/dm/pstats_print2list.svg
:target: https://pypi.python.org/pypi/pstats_print2list
Add to pstats library of cProfile the feature of get the result in a list with filters, limit and sort.
* Free software: ISC license
* Documentation: https://pythonhosted.org/pstats_print2list/
Features
--------
* Add the posiblity of get profiling report pstats result in a list.
* Add the posibility of sort the result with a default pstats index.
* Add the posilibity of add a limit to result.
* Add the posibility of filter by paths or files.
* Add the posibility of exclude paths or files.
Installation
------------
* Using pypi: ``pip install pstats_print2list``
Usage
-----
* Small example:
.. code-block:: python
import pstats_print2list
print "Method docstring", pstats_print2list.get_pstats_print2list.__doc__
pstats_list = pstats_print2list.get_pstats_print2list(['fname_stat1', 'fname_stat2'])
pstats_print2list.print_pstats_list(pstats_list)
..
* Small line command example:
.. code-block:: bash
python -c "from pstats_print2list import get_pstats_print2list, print_pstats_list;print print_pstats_list(get_pstats_print2list('YOUR_FILE'))"
* Full example:
.. code-block:: python
from pstats_print2list import get_pstats_print2list, print_pstats_list
fname_stats = 'my_profiling_out.stats'
pstats_list = get_pstats_print2list(
fname_stats,
filter_fnames=['myfile1.py', 'myfile2.py', 'root_path1'],
exclude_fnames=['dontshow.py', 'path_dont_show'],
sort='cumulative',
limit=5,
)
print_pstats_list(pstats_list)
..
Credits
-------
This package was created by Vauxoo_
.. _Vauxoo: https://www.vauxoo.com/
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Authors
-------
Moisés López <moylop260@vauxoo.com>
=======
History
=======
0.1.0 (2016-02-22)
------------------
* First release on PyPI.
1.1.2 (2016-02-26)
* First stable version
pstats_print2list
=================
.. image:: https://img.shields.io/pypi/v/pstats_print2list.svg
:target: https://pypi.python.org/pypi/pstats_print2list
.. image:: https://img.shields.io/travis/Vauxoo/pstats-print2list.svg
:target: https://travis-ci.org/Vauxoo/pstats-print2list
.. .. image:: https://readthedocs.org/projects/pstats_print2list/badge/?version=latest
.. :target: https://readthedocs.org/projects/pstats_print2list/?badge=latest
.. :alt: Documentation Status
.. image:: https://coveralls.io/repos/github/Vauxoo/pstats-print2list/badge.svg?branch=master
:target: https://coveralls.io/github/Vauxoo/pstats-print2list?branch=master
.. image:: https://img.shields.io/pypi/dm/pstats_print2list.svg
:target: https://pypi.python.org/pypi/pstats_print2list
Add to pstats library of cProfile the feature of get the result in a list with filters, limit and sort.
* Free software: ISC license
* Documentation: https://pythonhosted.org/pstats_print2list/
Features
--------
* Add the posiblity of get profiling report pstats result in a list.
* Add the posibility of sort the result with a default pstats index.
* Add the posilibity of add a limit to result.
* Add the posibility of filter by paths or files.
* Add the posibility of exclude paths or files.
Installation
------------
* Using pypi: ``pip install pstats_print2list``
Usage
-----
* Small example:
.. code-block:: python
import pstats_print2list
print "Method docstring", pstats_print2list.get_pstats_print2list.__doc__
pstats_list = pstats_print2list.get_pstats_print2list(['fname_stat1', 'fname_stat2'])
pstats_print2list.print_pstats_list(pstats_list)
..
* Small line command example:
.. code-block:: bash
python -c "from pstats_print2list import get_pstats_print2list, print_pstats_list;print print_pstats_list(get_pstats_print2list('YOUR_FILE'))"
* Full example:
.. code-block:: python
from pstats_print2list import get_pstats_print2list, print_pstats_list
fname_stats = 'my_profiling_out.stats'
pstats_list = get_pstats_print2list(
fname_stats,
filter_fnames=['myfile1.py', 'myfile2.py', 'root_path1'],
exclude_fnames=['dontshow.py', 'path_dont_show'],
sort='cumulative',
limit=5,
)
print_pstats_list(pstats_list)
..
Credits
-------
This package was created by Vauxoo_
.. _Vauxoo: https://www.vauxoo.com/
This package was created with Cookiecutter_ and the `audreyr/cookiecutter-pypackage`_ project template.
.. _Cookiecutter: https://github.com/audreyr/cookiecutter
.. _`audreyr/cookiecutter-pypackage`: https://github.com/audreyr/cookiecutter-pypackage
Authors
-------
Moisés López <moylop260@vauxoo.com>
=======
History
=======
0.1.0 (2016-02-22)
------------------
* First release on PyPI.
1.1.2 (2016-02-26)
* First stable version
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
pstats_print2list-1.1.9.tar.gz
(14.6 kB
view details)
Built Distribution
File details
Details for the file pstats_print2list-1.1.9.tar.gz
.
File metadata
- Download URL: pstats_print2list-1.1.9.tar.gz
- Upload date:
- Size: 14.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 122e78edaf91621afb2a6974f1d0335fddc20b42962c5ece9ccaf369809bd72b |
|
MD5 | b49a3ff8d1c9bbdeeefb5edd8db2c616 |
|
BLAKE2b-256 | 01cd1a8d2defb03e3e6d796963bc0669bbce77e523059ba04cd2967ec9ea37b6 |
File details
Details for the file pstats_print2list-1.1.9-py2.py3-none-any.whl
.
File metadata
- Download URL: pstats_print2list-1.1.9-py2.py3-none-any.whl
- Upload date:
- Size: 6.2 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4865d4a2ebcaccd9d0e364c03cbd103f5d7deb1fd22b1b17bfb01a5435348cf6 |
|
MD5 | aedc34759639c5dc35c9dde323820a92 |
|
BLAKE2b-256 | 9a6468776ada91b777e8846d2bc74bc7e632bcbc2c8a2047f98c72ef3864e6d6 |