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

leak-patrol

v1.3.0

Published

| Simple dashboard to watch memory allocation at the time of Mark Sweep events.

Downloads

4

Readme

Leak Patrol

| Simple dashboard to watch memory allocation at the time of Mark Sweep events.

Install

npm i -g leak-patrol

Usage

leak-patrol ./my-app-entrypoint

Taking Heap Snapshots

Leak Patrol can take heap snapshots at specified marksweep counts which allows you to then look at memory usage deltas between these events. Here's an example:

LP_HEAPS_AT=5,6 leak-patrol ./my-app-entrypoint

The above will take a heap snapshot at the 5th and the 6th MarkSweep event.

The snapshots will be written to your current directory.

Example Output

Below is a sample of the types of data which leak patrol exposes...

*********** MarkSweepCompact #1 ***********
date             : Tue Jul 18 2017 14:14:36 GMT-0500 (CDT)
duration         : 3.299
type             : MarkSweepCompact
forced           : false
flags            : 0
pid              : 24920
heapSizeLimit    : 1.4GB
rss              : 112.83MB
heapTotal        : 88.75MB
heapUsed         : 67.29MB
external         : 1.25MB
openRequestCount : 0
eventLoopDelay   : 2.332664ms

space_name          space_size  space_used_size  space_available_size  physical_space_size
------------------  ----------  ---------------  --------------------  -------------------
new_space           32MB        14.48MB          1.26MB                32MB
old_space           33MB        31.25MB          466.99kB              33MB
code_space          9MB         7.91MB           288.84kB              9MB
map_space           3MB         2.36MB           54.42kB               3MB
large_object_space  11.75MB     11.48MB          1.31GB                11.75MB


*********** MarkSweepCompact #2 ***********
date             : Tue Jul 18 2017 14:15:04 GMT-0500 (CDT)
duration         : 11.603
type             : MarkSweepCompact
forced           : false
flags            : 0
pid              : 24920
heapSizeLimit    : 1.4GB
rss              : 81.11MB
heapTotal        : 56.92MB
heapUsed         : 44.04MB
external         : 1.36MB
rssDelta         : -31.72MB
heapTotalDelta   : -31.83MB
heapUsedDelta    : -23.25MB
externalDelta    : 115.95kB
openRequestCount : 0
eventLoopDelay   : 0.659448ms

space_name          space_size  space_used_size  space_available_size  physical_space_size
------------------  ----------  ---------------  --------------------  -------------------
new_space           3MB         1.59MB           1.36MB                3MB
old_space           35MB        28.38MB          2.65MB                35MB
code_space          9MB         6.23MB           2.52MB                9MB
map_space           3MB         1.22MB           1.73MB                3MB
large_object_space  6.92MB      6.77MB           1.34GB                6.92MB


*********** MarkSweepCompact #3 ***********
date             : Tue Jul 18 2017 14:15:16 GMT-0500 (CDT)
duration         : 20.186
type             : MarkSweepCompact
forced           : false
flags            : 0
pid              : 24920
heapSizeLimit    : 1.4GB
rss              : 81.36MB
heapTotal        : 49.92MB
heapUsed         : 43.73MB
external         : 164.65kB
rssDelta         : 252kB
heapTotalDelta   : -7MB
heapUsedDelta    : -317.94kB
externalDelta    : -1.2MB
openRequestCount : 0
eventLoopDelay   : 0.396658ms

space_name          space_size  space_used_size  space_available_size  physical_space_size
------------------  ----------  ---------------  --------------------  -------------------
new_space           1MB         102.2kB          905.3kB               1MB
old_space           32MB        29.65MB          1.25MB                32MB
code_space          7MB         6.14MB           200.13kB              7MB
map_space           3MB         1.22MB           1.73MB                3MB
large_object_space  6.92MB      6.77MB           1.35GB                6.92MB

License

Apache 2.0