百科.dev
全部条目在线工具AI 编程趋势榜开源项目技术资讯提交条目
登录
< 返回工具列表
F

flamelens

> 编程语言
开源

终端中的 Flamegraph 查看器

631 stars0 点赞0 次浏览
访问官网GitHub

工具介绍

终端中的 Flamegraph 查看器

flamelens

flamelens is an interactive flamegraph viewer in the terminal.

What is it?

Flamegraph tools such as FlameGraph and inferno process output from various profiling tools and generate intermediate data in the "folded" format ready for flamegraph plotting. Instead of plotting the flamegraph as an SVG file, flamelens takes the folded stacks data and generates an interactive flamegraph in the terminal.

No more hauling SVG files and opening a browser just to have a quick look at the profiling result!

Usage

Run flamelens with the filename of the profiling data in the form of "folded stacks":

flamelens 

You can also pipe data directly to flamelens without providing a filename.

cargo-flamegraph

You can use flamelens as the viewer of cargo flamegraph this way:

cargo flamegraph --post-process 'flamelens --echo' [other cargo flamegraph arguments]

The --echo flag ensures that the flamegraph SVG file is also generated by cargo flamegraph on exit.

Viewing perf data

If have a perf.data file generated by perf (e.g. by using cargo flamegraph to profile your program in Linux), you can visualize it in flamelens this way with the help of inferno:

perf script -i perf.data | inferno-collapse-perf | flamelens

See inferno on generating folded stacks data from profiling data of different formats.

Python

Display a live flamegraph of a running Python program using py-spy as the profiler:

flamelens --pid 

This requires enabling the python feature when installing.

Example of a live flamegraph:

Key bindings

Key Action
hjkl (or ← ↓ ↑→ ) Navigate cursor for frame selection
f Scroll down
b Scroll up
G Scroll to bottom
g Scroll to top
Enter Zoom in on the selected frame
Esc Reset zoom
/ Find and highlight frames matching the regex
# Find and highlight frames matching the selected frame
n Jump to next match
N Jump to previous match
r Reset to default view
z (in Live mode) Freeze the flamegraph
q (or Ctrl + c) Exit

Installation

If you have Rust installed, flamelens is available on crates.io and you can install it using:

cargo install flamelens --locked

If you want the live flamegraph functionality, install with the --all-features option:

cargo install flamelens --locked --all-features

Note: Compiling with --all-features option may require libunwind to be installed on your system.

Alternatively, build and install from source after cloning this repo:

cargo install --path $(pwd) --locked

Distro Packages

Arch Linux

You can install from the extra repository using pacman:

pacman -S flamelens

Issues· 0 开放

查看全部 Issues在 GitHub 打开

暂无开放 Issues,或尚未同步最近议题。

> 标签

Rust

暂无评论,来聊聊你的看法吧

> 工具信息

发布日期2026年8月1日
最后更新2026年9月17日
分类编程语言
定价开源

> 相关工具

T
TypeScript
JavaScript 的超集,为前端与全栈提供静态类型
P
Python
通用编程语言,广泛用于 Web、数据与 AI
G
Go
Google 推出的简洁高效系统语言