Skip to content
This repository has been archived by the owner on Feb 13, 2018. It is now read-only.

A wrapper for node that captures cpu profiles, gc information and heap dumps

License

Notifications You must be signed in to change notification settings

alphagov/node-performance-harness

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A harness for starting a node app and recording performance.

Installation

$ npm install -g performance-harness

Running

$ node-perf run [--out=<path>] <script>

This will run the given script but wrap it in memwatch and a profiler. You can cause a heap dump to be taken by signalling SIGALRM. The internal node process running your code can be exitted by signalling SIGUSR2.

Providing --out will dump the report into the given path rather than ./out.json

The script provided should be the usual entry point into your application that you would run with node <script>.

$ node-perf view <json>

This will start a webserver on port 3000 and expose an html interface to view the results stored in the report json.

About

A wrapper for node that captures cpu profiles, gc information and heap dumps

Resources

License

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages