Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ymichael/cprofilev
:fire: An easier way to use cProfile
https://github.com/ymichael/cprofilev
Last synced: 3 months ago
JSON representation
:fire: An easier way to use cProfile
- Host: GitHub
- URL: https://github.com/ymichael/cprofilev
- Owner: ymichael
- License: mit
- Created: 2014-03-06T05:08:46.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2016-02-01T23:34:39.000Z (over 8 years ago)
- Last Synced: 2024-03-18T18:03:43.546Z (3 months ago)
- Language: Python
- Homepage: https://pypi.python.org/pypi/CProfileV
- Size: 46.9 KB
- Stars: 413
- Watchers: 9
- Forks: 31
- Open Issues: 10
-
Metadata Files:
- Readme: README.rst
- Changelog: CHANGES.txt
- License: LICENSE.txt
Lists
- my-awesome-starred - cprofilev - An easier way to use cProfile (Python)
- my-awesome-stars - ymichael/cprofilev - :fire: An easier way to use cProfile (Python)
README
=========
cprofilev
=========
An easier way to use `cProfile `_.
______________________________about
*****
cprofilev runs and profiles a given python program and outputs a simple html view of the statistics collected.See: http://ymichael.com/2014/03/08/profiling-python-with-cprofile.html on how to make sense of the profiled statistics.
installation
*****
*on most UNIX-like systems, you'll probably need to run the following `install` command as root or by using sudo*::
pip install cprofilev
quickstart
**********1. Simply run your python program in with the **-m cprofilev** flag.
::
$ python -m cprofilev /path/to/python/program ...
2. Navigate to http://localhost:4000 to view profile statistics of your python program (even while its still running!)
Alternatively you can output view cprofile output using the **-f flag**:
::
# NOTE this is cProfile not cprofilev
$ python -m cProfile -o /path/to/save/output /path/to/python/program ...
$ cprofilev -f /path/to/save/outputusage
*****::
usage: cprofilev.py [--version] [-a ADDRESS] [-p PORT] scriptfile [arg] ...
An easier way to use cProfile.
positional arguments:
scriptfile The python script file to run and profile.optional arguments:
-h, --help show this help message and exit
--version show program's version number and exit
-a ADDRESS, --address ADDRESS
The address to listen on. (defaults to 127.0.0.1).
-p PORT, --port PORT The port to listen on. (defaults to 4000).
-f FILE, --file FILE cProfile output to view.
If specified, the scriptfile provided will be ignored.Dependencies
*****
`bottle `_: used for serving the html page.Development
*****To quickly contribute to cprofilev, you can use this example as a means to
profile things::python -m cprofilev example_for_profiling.py