Metadata-Version: 2.1
Name: flameshow
Version: 0.2.1
Summary: A Terminal Flamegraph Viewer
Home-page: https://github.com/laixintao/flameshow
License: GPLv3
Keywords: terminal,golang,pprof,flamegraph
Author: laixintao
Author-email: laixintaoo@gmail.com
Maintainer: laixintao
Maintainer-email: laixintaoo@gmail.com
Requires-Python: >=3.10,<4.0
Classifier: Development Status :: 4 - Beta
Classifier: Environment :: Console
Classifier: Intended Audience :: Developers
Classifier: License :: Other/Proprietary License
Classifier: Operating System :: MacOS
Classifier: Operating System :: Microsoft :: Windows :: Windows 10
Classifier: Operating System :: Microsoft :: Windows :: Windows 11
Classifier: Operating System :: POSIX :: Linux
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Typing :: Typed
Requires-Dist: click (>=8.1.7,<9.0.0)
Requires-Dist: protobuf (>=4.24,<5.0)
Requires-Dist: textual (>=0.37.1,<0.38.0)
Requires-Dist: typing-extensions (>=4.7.1,<5.0.0)
Project-URL: Bug Tracker, https://github.com/laixintao/flameshow/issues
Description-Content-Type: text/markdown

# Flameshow

<a href="https://badge.fury.io/py/flameshow"><img src="https://badge.fury.io/py/flameshow.svg" alt="PyPI version"></a>
[![Test](https://github.com/laixintao/flameshow/actions/workflows/pytest.yaml/badge.svg)](https://github.com/laixintao/flameshow/actions/workflows/pytest.yaml)

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
```

## 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:

- <kbd>q</kbd> for quit
- <kbd>j</kbd> <kbd>i</kbd> <kbd>j</kbd> <kbd>k</kbd> or <kbd>←</kbd>
  <kbd>↓</kbd> <kbd>↑</kbd> <kbd>→</kbd> for moving around, and <kbd>Enter</kbd>
  for zoom in, then <kbd>Esc</kbd> for zoom out.
- You can also use a mouse, hover on a span will show it details, and click will
  zoom it.

## Supported Formats

At the moment, Flameshow supports only Golang's pprof dump. I'm actively working
on adding more formats. Admittedly, I might not be familiar with every tool and
its specifics. So, if you'd like Flameshow to integrate with a tool you love,
feel free reach out and drop an issue.

- Golang pprof

## Development

If you want to dive into the code and make some changes, start with:

```shell
git clone git@github.com:laixintao/flameshow.git
cd flameshow
pip install poetry
poetry install
```

---

This project is proudly powered by
[textual](https://github.com/Textualize/textual).

