Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/laixintao/flameshow
A terminal Flamegraph viewer.
https://github.com/laixintao/flameshow
flamegraph golang perf performance-analysis pprof profiling
Last synced: 7 days ago
JSON representation
A terminal Flamegraph viewer.
- Host: GitHub
- URL: https://github.com/laixintao/flameshow
- Owner: laixintao
- Created: 2023-09-24T11:21:54.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2024-03-05T13:52:39.000Z (9 months ago)
- Last Synced: 2024-09-27T02:25:01.112Z (3 months ago)
- Topics: flamegraph, golang, perf, performance-analysis, pprof, profiling
- Language: Python
- Homepage:
- Size: 2.97 MB
- Stars: 1,019
- Watchers: 6
- Forks: 21
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-performance - Flameshow (Terminal Flamegraph viewer)
- my-awesome - laixintao/flameshow - analysis,pprof,profiling pushed_at:2024-10 star:1.0k fork:0.0k A terminal Flamegraph viewer. (Python)
README
# Flameshow
[![tests](https://github.com/laixintao/flameshow/actions/workflows/pytest.yaml/badge.svg?branch=main)](https://github.com/laixintao/flameshow/actions/workflows/pytest.yaml)
[![codecov](https://codecov.io/gh/laixintao/flameshow/graph/badge.svg?token=XQCGN9GBL4)](https://codecov.io/gh/laixintao/flameshow)
[![PyPI](https://img.shields.io/pypi/v/flameshow.svg?logo=pypi&label=PyPI&logoColor=gold)](https://pypi.org/project/flameshow/)
![PyPI - Python Version](https://img.shields.io/pypi/pyversions/flameshow?logo=python&logoColor=gold)
![PyPI - Downloads](https://img.shields.io/pypi/dm/flameshow)
[![Code style: black](https://img.shields.io/badge/code%20style-black-000000.svg)](https://github.com/psf/black)Flameshow is a terminal Flamegraph viewer.
![](./docs/flameshow.gif)
## Features
- Renders Flamegraphs in your terminal
- Supports zooming in and displaying percentages
- Keyboard input is prioritized
- All operations can also be performed using the mouse.
- Can switch to different sample types## Install
Flameshow is written in pure Python, so you can install via `pip`:
```shell
pip install flameshow
```But you can also run it through [nix](https://nixos.org/):
```shell
nix run github:laixintao/flameshow
# Or if you want to install it imperatively:
nix profile install github:laixintao/flameshow
```## Usage
View golang's goroutine dump:
```shell
$ curl http://localhost:9100/debug/pprof/goroutine -o goroutine.out
$ flameshow goroutine.out
```After entering the TUI, the available actions are listed on Footer:
- q for quit
- h j k l or ←
↓ ↑ → for moving around, and Enter
for zoom in, then Esc for zoom out.
- You can also use a mouse, hover on a span will show it details, and click will
zoom it.## Supported Formats
As far as I know, there is no standard specification for profiles. Different
languages or tools might generate varying profile formats. I'm actively working
on supporting more formats. Admittedly, I might not be familiar with every tool
and its specific format. So, if you'd like Flameshow to integrate with a tool
you love, please feel free to reach out and submit an issue.- Golang pprof
- [Brendan Gregg's Flamegraph](https://www.brendangregg.com/flamegraphs.html)
- Python [Austin](https://github.com/P403n1x87/austin)## Development
If you want to dive into the code and make some changes, start with:
```shell
git clone [email protected]:laixintao/flameshow.git
cd flameshow
pip install poetry
poetry install
```---
This project is proudly powered by
[textual](https://github.com/Textualize/textual).