npm.io
1.1.3 • Published 7 years ago

sync-cpuprofiler

Licence
MIT
Version
1.1.3
Deps
1
Size
7 kB
Vulns
0
Weekly
0
Stars
2

sync-cpuprofiler

Create a new cpuprofile for the currend node process

Usage

To create a new profile to profiles/profile-0000000000.cpuprofile just run the following command:

require('sync-cpuprofiler')();

To change the profile name you can specify any path:

require('sync-cpuprofiler')('profiles/demo.cpuprofile');

Using .cpuprofile

The .cpuprofile can be analysed using the Google Chrome DevTools:
GoogleChrome DevTools

Parsing .cpuprofile

To render a .cpuprofile or to get the timings of it you have to convert it with cpuprofile-to-flamegraph.

Browser Javascript Profiling

sync-cpuprofiler works only for node - If you need something similar for browserside javacsript take a look at automated-chrome-profiling.