Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/csurfer/pyheat
pprofile + matplotlib = Python program profiled as an awesome heatmap!
https://github.com/csurfer/pyheat
heatmap matplotlib profiling python
Last synced: 5 days ago
JSON representation
pprofile + matplotlib = Python program profiled as an awesome heatmap!
- Host: GitHub
- URL: https://github.com/csurfer/pyheat
- Owner: csurfer
- License: mit
- Created: 2017-02-04T22:56:02.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T11:25:43.000Z (over 1 year ago)
- Last Synced: 2025-02-08T12:03:50.664Z (12 days ago)
- Topics: heatmap, matplotlib, profiling, python
- Language: Python
- Homepage:
- Size: 131 KB
- Stars: 834
- Watchers: 11
- Forks: 46
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
# pyheat
[](https://pypi.python.org/pypi/py-heat)
[](https://pypi.python.org/pypi/py-heat)
[](https://travis-ci.org/csurfer/pyheat)
[](https://coveralls.io/github/csurfer/pyheat?branch=master)
[](https://raw.githubusercontent.com/csurfer/pyheat/master/LICENSE)
[](https://saythanks.io/to/csurfer)Profilers are extremely helpful tools. They help us dig deep into code, find and understand performance bottlenecks. But sometimes we just want to lay back, relax and still get a gist of the hot zones in our code.
> A picture is worth a thousand words.
So, instead of presenting the data in tabular form, if presented as a heatmap visualization, it makes comprehending the time distribution in the given program much easier and quicker. That is exactly what is being done here !
## Demo

## Scroll Demo

## Features
- Simple CLI interface.
- No complicated setup.
- Heatmap visualization to view hot zones in code.
- Ability to export the heatmap as an image file.
- Ability to scroll, to help view heatmap of large py files.## Setup
### Using pip
```bash
pip install py-heat
```### Directly from the repository
```bash
git clone https://github.com/csurfer/pyheat.git
python pyheat/setup.py install
```## Usage
### As a command
```bash
# To view the heatmap.
pyheat
# To output the heatmap as a file.
pyheat --out image_file.png
pyheat --help
```### As a module
```python
from pyheat import PyHeat
ph = PyHeat()
ph.create_heatmap()
# To view the heatmap.
ph.show_heatmap()
# To output the heatmap as a file.
ph.show_heatmap('image_file.png')
```## Contributing
### Bug Reports and Feature Requests
Please use [issue tracker](https://github.com/csurfer/pyheat/issues) for reporting bugs or feature requests.
### Development
Pull requests are most welcome.
### Buy the developer a cup of coffee!
If you found the utility helpful you can buy me a cup of coffee using
[](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=3BSBW7D45C4YN&lc=US¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)