{"id":13677693,"url":"https://github.com/4rtzel/tfg","last_synced_at":"2025-04-29T11:31:31.462Z","repository":{"id":226796458,"uuid":"165622426","full_name":"4rtzel/tfg","owner":"4rtzel","description":"Terminal flame graph","archived":false,"fork":false,"pushed_at":"2020-07-13T09:06:19.000Z","size":17,"stargazers_count":108,"open_issues_count":2,"forks_count":4,"subscribers_count":2,"default_branch":"master","last_synced_at":"2024-11-11T19:41:57.294Z","etag":null,"topics":["command-line-tool","flamegraph","performance"],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/4rtzel.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2019-01-14T08:19:07.000Z","updated_at":"2024-08-27T08:19:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"646546f1-4cd2-4f05-9d79-1c163b873f0d","html_url":"https://github.com/4rtzel/tfg","commit_stats":null,"previous_names":["4rtzel/tfg"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rtzel%2Ftfg","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rtzel%2Ftfg/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rtzel%2Ftfg/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/4rtzel%2Ftfg/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/4rtzel","download_url":"https://codeload.github.com/4rtzel/tfg/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251493877,"owners_count":21598184,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["command-line-tool","flamegraph","performance"],"created_at":"2024-08-02T13:00:45.906Z","updated_at":"2025-04-29T11:31:31.450Z","avatar_url":"https://github.com/4rtzel.png","language":"Python","readme":"# Terminal flame graph (tfg)\nCommand line tool to parse **DTrace** and **perf** output and display it as a flame graph inside your terminal emulator.\n\n## Motivation\nSometimes you may want to visualize a stack trace with [FlameGraph](https://github.com/brendangregg/FlameGraph) of your \napplication running on a server, so you will need to copy a stack traces from your server to your local machine, \ncreate a .svg file and open it in the browser.\nThis process can get tedious if you're doing that a lot or if you just want to take a quick look of stack traces.\n\nThis tool is trying to solve that by letting you view the stack traces inside your terminal emulator.\n\n## Getting Started\nThis project is trying to be as simple and self-contained as possible, so the only real dependency here (besides Python interpreter)\nis [libncurses](https://www.gnu.org/software/ncurses/) which should probably be installed on every system.\n\nAlso, this project is Python 2/3 compatible.\n\nTo start, simple ```git clone https://github.com/4rtzel/tfg``` and you're good to go.\n\n## Usage\n* run **DTrace** or **perf** tool to collect stack traces\n\n  **DTrace:**\n  ```bash\n  dtrace -n 'profile-197 {@[ustack(100)]=count()' \u003e on.stacks\n  ```\n  **perf:**\n  ```bash\n  perf record -g -a -- sleep 1\n  perf script \u003e on.stacks\n  ```\n* run **tfg.py** and specify an input file type\n  ```bash\n  tfg.py -t perf on.stacks\n  ```\n* use the following keybindings to navigate\n\n  ```→```, ```←```, ```↑```, ```↓``` - navigation\n  \n  ```c``` - on/off combined frames\n  \n  ```Enter``` - zoom to a selected frame\n  \n  ```r``` - reset\n  \n  ```q``` - quit\n\n\nHere is an example of running **tfg** with **perf**:\n[![asciicast](https://asciinema.org/a/UpqUa5iZCFzmoFEGjjqYjPI3X.svg)](https://asciinema.org/a/UpqUa5iZCFzmoFEGjjqYjPI3X)\n\n## TODO\n* Tests\n* Search option and highlight\n* Diff view\n","funding_links":[],"categories":["Profiling"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rtzel%2Ftfg","html_url":"https://awesome.ecosyste.ms/projects/github.com%2F4rtzel%2Ftfg","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2F4rtzel%2Ftfg/lists"}