Giter Site home page Giter Site logo

dstrbad / flamescope Goto Github PK

View Code? Open in Web Editor NEW

This project forked from netflix/flamescope

0.0 2.0 0.0 3.85 MB

FlameScope is a visualization tool for exploring different time ranges as Flame Graphs.

License: Apache License 2.0

JavaScript 2.73% Python 1.79% HTML 0.04% CSS 95.43%

flamescope's Introduction

FlameScope

FlameScope

Gitter TravisCI NetflixOSS Lifecycle License

FlameScope 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.

FlameScope 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.

Disclaimer

FlameScope 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!

Installation / Instructions

The quickest way to get started is to run the pre-built client bundle:

$ git clone https://github.com/Netflix/flamescope
$ cd flamescope
$ pip install -r requirements.txt
$ python run.py

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

$ sudo perf record -F 49 -a -g -- sleep 120
$ sudo perf script --header > stacks.myproductionapp.2018-03-30_01
$ gzip stacks.myproductionapp.2018-03-30_01	# optional

There 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: java needs to be running with the -XX:+PreserveFramePointer option, and perf-map-agent must be run immediately after the perf record to dump a JIT symbol table in /tmp.

FlameScope 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.

FlameScope 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.

Although not necessary, we strongly suggest using virtualenv to isolate your Python environment.

By default, FlameScope will load a list of files from the examples directory, which includes a two profile examples.

Configuration Options

FlameScope configuration file can be found in app/config.py.

DEBUG = True # run the web server in debug mode
STACK_DIR = 'examples' # path where flamescope will look for profiles
HOST = '127.0.0.1' # web server host
PORT = 5000 # web server port
JSONIFY_PRETTYPRINT_REGULAR = False # pretty print api json responses

Building Client from Source

In order to build the client application from source, the following command line tools must be installed:

Once those tools are available, you will be able to install the project dependencies and generate a build.

$ yarn install
$ npm run webpack

The npm run webpack command will generate a new build under app/public. This directory is exposed by the Python web server.

Webpack can also watch and recompile files whenever they change. To build and start the watch task, run the following command:

$ npm run webpack-watch

References

flamescope's People

Contributors

brendangregg avatar ekmartin avatar sonicdoe avatar spiermar avatar steven-aerts avatar takac avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.