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: about 8 hours 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 (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2023-07-04T11:25:43.000Z (over 1 year ago)
- Last Synced: 2024-11-06T14:23:01.935Z (7 days ago)
- Topics: heatmap, matplotlib, profiling, python
- Language: Python
- Homepage:
- Size: 131 KB
- Stars: 832
- Watchers: 11
- Forks: 46
- Open Issues: 8
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.rst
- License: LICENSE
Awesome Lists containing this project
README
# pyheat
[![pypiv](https://img.shields.io/pypi/v/py-heat.svg)](https://pypi.python.org/pypi/py-heat)
[![pyv](https://img.shields.io/pypi/pyversions/py-heat.svg)](https://pypi.python.org/pypi/py-heat)
[![Build Status](https://travis-ci.org/csurfer/pyheat.svg?branch=master)](https://travis-ci.org/csurfer/pyheat)
[![Coverage Status](https://coveralls.io/repos/github/csurfer/pyheat/badge.svg?branch=master)](https://coveralls.io/github/csurfer/pyheat?branch=master)
[![Licence](https://img.shields.io/badge/license-MIT-blue.svg)](https://raw.githubusercontent.com/csurfer/pyheat/master/LICENSE)
[![Thanks](https://img.shields.io/badge/Say%20Thanks-!-1EAEDB.svg)](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
![Demo](http://i.imgur.com/qOeXUPR.png)
## Scroll Demo
![ScrollDemo](https://i.imgur.com/5IdH8AG.gif)
## 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
[![Donate](https://www.paypalobjects.com/webstatic/en_US/i/btn/png/silver-pill-paypal-44px.png)](https://www.paypal.com/cgi-bin/webscr?cmd=_donations&business=3BSBW7D45C4YN&lc=US¤cy_code=USD&bn=PP%2dDonationsBF%3abtn_donate_SM%2egif%3aNonHosted)