{"id":13405726,"url":"https://github.com/Netflix/flamescope","last_synced_at":"2025-03-14T10:31:34.313Z","repository":{"id":41960724,"uuid":"127360212","full_name":"Netflix/flamescope","owner":"Netflix","description":"FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.","archived":false,"fork":false,"pushed_at":"2023-10-06T14:48:52.000Z","size":8250,"stargazers_count":3012,"open_issues_count":40,"forks_count":168,"subscribers_count":360,"default_branch":"master","last_synced_at":"2024-10-10T17:21:40.882Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Netflix.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG","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}},"created_at":"2018-03-30T00:12:04.000Z","updated_at":"2024-10-09T17:56:11.000Z","dependencies_parsed_at":"2023-10-21T12:27:42.040Z","dependency_job_id":null,"html_url":"https://github.com/Netflix/flamescope","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fflamescope","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fflamescope/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fflamescope/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Netflix%2Fflamescope/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Netflix","download_url":"https://codeload.github.com/Netflix/flamescope/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":221458215,"owners_count":16825271,"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":[],"created_at":"2024-07-30T19:02:09.662Z","updated_at":"2025-03-14T10:31:34.302Z","avatar_url":"https://github.com/Netflix.png","language":"Python","readme":"# FlameScope\n\n![FlameScope](docs/screenshot-flamescope-02-annotated.png)\n\n[![Gitter](https://badges.gitter.im/gitterHQ/gitter.svg)](https://gitter.im/flamescope)\n[![TravisCI](https://travis-ci.com/Netflix/flamescope.svg)](https://travis-ci.com/Netflix/flamescope)\n[![NetflixOSS Lifecycle](https://img.shields.io/osslifecycle/Netflix/flamescope.svg)]()\n[![License](https://img.shields.io/github/license/Netflix/flamescope.svg)](http://www.apache.org/licenses/LICENSE-2.0)\n\nFlameScope is a visualization tool for exploring different time ranges as Flame Graphs, allowing quick analysis of performance issues such as perturbations, variance, single-threaded execution, and more.\n\nFlameScope begins by displaying the input data as an interactive subsecond-offset heat map. This shows patterns in the data. You can then select a time range to highlight on different patterns, and a flame graph will be generated just for that time range.\n\n## Disclaimer\n\nFlameScope is in early stages of development and under constant change, so bugs and issues are expected. We count on your support to find and report them!\n\n## Installation / Instructions\n\nThe quickest way to get started is to run the pre-built client bundle:\n\n```bash\n$ git clone https://github.com/Netflix/flamescope\n$ cd flamescope\n$ pip install -r requirements.txt\n$ python run.py\n```\n\n(Note python3 is assumed, python2 _may_ work)\n\nThen browse to http://127.0.0.1:5000/, and you can begin exploring profiles from the `examples` directory. You can add new profiles to that directory, collected using Linux `perf`. Here are instructions for a generic CPU profile at 49 Hertz for 120 seconds:\n\n```bash\n$ sudo perf record -F 49 -a -g -- sleep 120\n$ sudo perf script --header \u003e stacks.myproductionapp.2018-03-30_01\n$ gzip stacks.myproductionapp.2018-03-30_01\t# optional\n```\n\nIf you are profiling C++ code, you may want to pipe stacks through `c++filt` to get readable frames.\n\nThere are extra steps to fetch stacks correctly for some runtimes, depending on the runtime. For example, we've previously published Java steps in [Java in Flames](https://medium.com/netflix-techblog/java-in-flames-e763b3d32166): java needs to be running with the -XX:+PreserveFramePointer option, and [perf-map-agent](https://github.com/jvm-profiling-tools/perf-map-agent) must be run immediately after the `perf record` to dump a JIT symbol table in /tmp.\n\nFlameScope can visualize any Linux `perf script` output that includes stack traces, including page faults, context switches, and other events. See the References section below for documentation.\n\nFlameScope is composed of two main components, the Python backend, and a React client interface. A pre-built client bundle is distributed with the backend, so the quickest way to get started is to install the Python requirements and start the application, as described earlier.\n\nAlthough not necessary, we **strongly** suggest using [virtualenv](https://github.com/pypa/virtualenv) to isolate your Python environment.\n\nBy default, FlameScope will load a list of files from the `examples` directory, which includes a two profile examples.\n\n## Configuration Options\n\nFlameScope configuration file can be found in `app/config.py`.\n\n```python\nDEBUG = True # run the web server in debug mode\nPROFILE_DIR = 'examples' # path where flamescope will look for profiles\nHOST = '127.0.0.1' # web server host\nPORT = 5000 # web server port\nJSONIFY_PRETTYPRINT_REGULAR = False # pretty print api json responses\n```\n\n## Building Client from Source\n\nIn order to build the client application from source, the following command line tools must be installed:\n\n- [Node.js/Npm](https://nodejs.org/en/download/)\n\nOnce those tools are available, you will be able to install the project dependencies and generate a build.\n\n```bash\n$ npm install\n$ npm run webpack\n```\n\nThe `npm run webpack` command will generate a new build under `app/public`. This directory is exposed by the Python web server.\n\nWebpack can also watch and recompile files whenever they change. To build and start the _watch_ task, run the following command:\n\n```bash\n$ npm run webpack-watch\n```\n\n## Building a Docker Image\n\nFlameScope provides a Dockerfile to build a Docker image:\n\n```bash\n$ cd flamescope\n$ docker build -t flamescope .\n```\n\nThe container expects the profiles to be bind-mounted into `/profiles` and listens on port 5000. To view profiles from `/tmp/profiles`, start the container with the following command:\n\n```\n$ docker run --rm -it -v /tmp/profiles:/profiles:ro -p 5000:5000 flamescope\n```\n\nThen access FlameScope on [http://127.0.0.1:5000](http://127.0.0.1:5000/)\n\n## References\n\n- [FlameScope Introduction (video)](https://www.youtube.com/watch?v=cFuI8SAAvJg)\n- [FlameScope Examples (video)](https://www.youtube.com/watch?v=gRawd7CO-Q8)\n- [Flame Graphs](http://www.brendangregg.com/flamegraphs.html)\n- [Java in Flames](https://medium.com/netflix-techblog/java-in-flames-e763b3d32166)\n- [Subsecond-offset Heat Maps](http://www.brendangregg.com/HeatMaps/subsecondoffset.html)\n- [Linux perf kernel docs](https://github.com/torvalds/linux/tree/master/tools/perf/Documentation)\n- [Linux perf wiki](https://perf.wiki.kernel.org/index.php/Main_Page)\n- [Linux perf examples](http://www.brendangregg.com/perf.html)\n","funding_links":[],"categories":["Python","8. Visualization","HarmonyOS","1. System Overview"],"sub_categories":["General \u0026 Tools","Windows Manager"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNetflix%2Fflamescope","html_url":"https://awesome.ecosyste.ms/projects/github.com%2FNetflix%2Fflamescope","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2FNetflix%2Fflamescope/lists"}