Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/nvdv/vprof
Visual profiler for Python
https://github.com/nvdv/vprof
cpu-flame-graph d3 developer-tools javascript profiler python stats visualization
Last synced: about 2 months ago
JSON representation
Visual profiler for Python
- Host: GitHub
- URL: https://github.com/nvdv/vprof
- Owner: nvdv
- License: bsd-2-clause
- Created: 2015-06-29T03:59:39.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2022-07-15T07:43:03.000Z (almost 2 years ago)
- Last Synced: 2024-03-30T22:20:44.011Z (3 months ago)
- Topics: cpu-flame-graph, d3, developer-tools, javascript, profiler, python, stats, visualization
- Language: Python
- Homepage:
- Size: 1.05 MB
- Stars: 3,948
- Watchers: 71
- Forks: 154
- Open Issues: 30
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Lists
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-cn - vprof
- Awesome-Python - vprof - Visual Python profiler. (Debugging Tools)
- Python-Awesome - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - 2-Clause](https://api.github.com/licenses/bsd-2-clause)- Visual profiler for Python (Awesome Python / Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- python-awesome-case1 - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- fucking-awesome-python - :octocat: vprof - :star: 3926 :fork_and_knife: 170 - Visual Python profiler. (Debugging Tools)
- awesome-python-master - vprof - Visual Python profiler. (Debugging Tools)
- awesome_python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- join-awesome-python-interview-topics - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-cn - vprof
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-clone - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-resources-all - vprof - Visual Python profiler. (Debugging Tools)
- fucking-awesome-python - :octocat: vprof - :star: 3687 :fork_and_knife: 169 - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-resources - GitHub - 31% open · ⏱️ 15.07.2022): (调试工具)
- awesome-python-zh - vprof - Visual Python探查器。 (调试工具)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python-master - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome_python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-starts - nvdv/vprof - Visual profiler for Python (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesomePython - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- git-github.com-vinta-awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-stars - vprof
- python-awesome - vprof - Visual Python profiler. (Debugging Tools)
- my-awesome - nvdv/vprof - Visual profiler for Python (Python)
- my-awesomes-stars - vprof - Visual Python profiler (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- my-awesome-stars - nvdv/vprof - Visual profiler for Python (Python)
- awesome-stars - vprof - Visual Python profiler (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- Mpaperlee-awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- starred-awesome - vprof - Visual profiler for Python (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-projects - vprof - Visual profiler for Python (Python)
- awesome-stars - vprof - Visual profiler for Python (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- my-stars - nvdv/vprof - Visual profiler for Python (Python)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-python - vprof - Visual Python profiler. (Debugging Tools)
- awesome-stars - vprof - Visual profiler for Python (Python)
- awesome-stars - nvdv/vprof - `★3953` Visual profiler for Python (Python)
- awesome-list - vprof - A Python package providing rich and interactive visualizations for various Python program characteristics such as running time and memory usage. (Debugging & Profiling & Tracing / For Python)
- awesome-stars - nvdv/vprof - Visual profiler for Python (Python)
- my-awesome-stars - nvdv/vprof - Visual profiler for Python (Python)
- awesome-python - vprof - Visual profiler for Python ` 📝 4 months ago` (Debugging Tools [🔝](#readme))
README
[![PyPI](https://img.shields.io/pypi/v/vprof.svg)](https://pypi.python.org/pypi/vprof/)
# vprof
vprof is a Python package providing rich and interactive visualizations for
various Python program characteristics such as running time and memory usage.
It supports Python 3.4+ and distributed under BSD license.The project is in active development and some of its features might not work as
expected.## Screenshots
![vprof-gif](http://i.imgur.com/ikBlfvQ.gif)## Contributing
All contributions are highly encouraged! You can add new features,
report and fix existing bugs and write docs and tutorials.
Feel free to open an issue or send a pull request!## Prerequisites
Dependencies to build `vprof` from source code:
* Python 3.4+
* `pip`
* `npm` >= 3.3.12`npm` is required to build `vprof` from sources only.
## Dependencies
All Python and `npm` module dependencies are listed in `package.json` and
`requirements.txt`.## Installation
`vprof` can be installed from PyPI```sh
pip install vprof
```To build `vprof` from sources, clone this repository and execute
```sh
python3 setup.py deps_install && python3 setup.py build_ui && python3 setup.py install
```To install just `vprof` dependencies, run
```sh
python3 setup.py deps_install
```## Usage
```sh
vprof -c
```
`` is a combination of supported modes:* `c` - CPU flame graph ⚠️ **Not available for windows [#62](https://github.com/nvdv/vprof/issues/62)**
Shows CPU flame graph for ``.
* `p` - profiler
Runs built-in Python profiler on `` and displays results.
* `m` - memory graph
Shows objects that are tracked by CPython GC and left in memory after code
execution. Also shows process memory usage after execution of each line of ``.* `h` - code heatmap
Displays all executed code of `` with line run times and execution counts.
`` can be Python source file (e.g. `testscript.py`) or path to package
(e.g. `myproject/test_package`).To run scripts with arguments use double quotes
```sh
vprof -c cmh "testscript.py --foo --bar"
```Modes can be combined
```sh
vprof -c cm testscript.py
````vprof` can also profile functions. In order to do this,
launch `vprof` in remote mode:```sh
vprof -r
````vprof` will open new tab in default web browser and then wait for stats.
To profile a function run
```python
from vprof import runnerdef foo(arg1, arg2):
...runner.run(foo, 'cmhp', args=(arg1, arg2), host='localhost', port=8000)
```where `cmhp` is profiling mode, `host` and `port` are hostname and port of
`vprof` server launched in remote mode. Obtained stats will be rendered in new
tab of default web browser, opened by `vprof -r` command.`vprof` can save profile stats to file and render visualizations from
previously saved file.```sh
vprof -c cmh src.py --output-file profile.json
```writes profile to file and
```sh
vprof --input-file profile.json
```
renders visualizations from previously saved file.Check `vprof -h` for full list of supported parameters.
To show UI help, press `h` when visualizations are displayed.
Also you can check `examples` directory for more profiling examples.
## Testing
```sh
python3 setup.py test_python && python3 setup.py test_javascript && python3 setup.py e2e_test
```## License
BSD