npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

chrome2calltree

v1.0.2

Published

convert chrome CPU profiles to callgrind formatted files

Downloads

8

Readme

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.