Coder Social home page Coder Social logo

chrome2calltree's Introduction

chrome2calltree

Convert CPU profiles exported from Chrome to callgrind format.

uwflow.com example

Installation

This is only useful if you have KCacheGrind or QCacheGrind installed.

To install KCacheGrind on Linux:

sudo apt-get install kcachegrind

To install QCacheGrind on OS X:

brew install qcachegrind

Once you have that, grab the npm package:

npm install -g chrome2calltree

Usage

Collect a Chrome CPU profile either by using console.profile() or by clicking buttons in the Developer Tools. Save the profile somewhere to disk.

save Chrome CPU profile

Assuming you have KCacheGrind or QCacheGrind installed, you can then load your CPU profile using chrome2calltree. Note that it might open in the background, so you might have to manually switch applications.

chrome2calltree -k -i ~/Downloads/CPU-20131213T155541.cpuprofile

qcachegrind showing a CPU profile

If you want to save the converted callgrind output for later, you can do that using the -o flag.

chrome2calltree -i ~/Downloads/CPU-20131213T155541.cpuprofile -o foobar.profile
usage: chrome2calltree [-h] [-v] [-o OUTFILE] [-i INFILE] [-k]

Convert CPU profiles exported from Chrome to callgrind format

Optional arguments:
  -h, --help            Show this help message and exit.
  -v, --version         Show program's version number and exit.
  -o OUTFILE, --outfile OUTFILE
                        Save calltree stats to OUTFILE. If omitted, writes to
                        standard out.
  -i INFILE, --infile INFILE
                        Read chrome CPU profile from INFILE. If omitted,
                        reads from standard in.
  -k, --kcachegrind     Run the kcachegrind tool on the converted data.
                        Unless combined with the -o flag, will write output
                        to a temporary file and remove it after kcachegrind
                        exits.

chrome2calltree's People

Contributors

awstlaur avatar gwicke avatar jlfwong avatar paulirish avatar

Watchers

 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.