Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
/tfgPublic

Terminal flame graph

License

NotificationsYou must be signed in to change notification settings

4rtzel/tfg

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command line tool to parseDTrace andperf output and display it as a flame graph inside your terminal emulator.

Motivation

Sometimes you may want to visualize a stack trace withFlameGraph of yourapplication running on a server, so you will need to copy a stack traces from your server to your local machine,create a .svg file and open it in the browser.This process can get tedious if you're doing that a lot or if you just want to take a quick look of stack traces.

This tool is trying to solve that by letting you view the stack traces inside your terminal emulator.

Getting Started

This project is trying to be as simple and self-contained as possible, so the only real dependency here (besides Python interpreter)islibncurses which should probably be installed on every system.

Also, this project is Python 2/3 compatible.

To start, simplegit clone https://github.com/4rtzel/tfg and you're good to go.

Usage

  • runDTrace orperf tool to collect stack traces

    DTrace:

    dtrace -n'profile-197 {@[ustack(100)]=count()'> on.stacks

    perf:

    perf record -g -a -- sleep 1perf script> on.stacks
  • runtfg.py and specify an input file type

    tfg.py -t perf on.stacks
  • use the following keybindings to navigate

    ,,, - navigation

    c - on/off combined frames

    Enter - zoom to a selected frame

    r - reset

    q - quit

Here is an example of runningtfg withperf:asciicast

TODO

  • Tests
  • Search option and highlight
  • Diff view

Releases

No releases published

Packages

No packages published

Languages


[8]ページ先頭

©2009-2025 Movatter.jp