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

@luvsharma1931/memory-profiler

v1.0.6

Published

Intelligent memory profiler for Node.js applications to provide memory leak and heap memory usage information

Downloads

7

Readme

memory-profiler: Intelligent memory profiler for Node.js applications to provide memory leak and heap memory usage information

npm install @luvsharma1931/memory-profiler

  • It is a plug and play module created using Node.js which can be easily imported with a single import statement in your node.js application.
  • This module provides fully automated memory profiling process for Node.js applications and does not require any manual intervention at all from developers.
  • It also automatically creates report files for memory leak information and heap memory usage by the application which are saved at a default system location and can also be shared with teams.

alt text

  • These files contain data in JSON format and can directly be used as a data source for visualization tools like Kibana or Graphana to show graphs and charts depicting the heap memory usage trends or memory leak trends for your Node.js applications.
  • This module can run memory profiling for your application for ‘n’ number of days continuously without requiring any manual effort from developer.
  • Also, it can be used to run memory profiling on production/release candidate builds(live deployments) created using CI/CD pipelines as it is easily imported with a single import statement and no complex integration is required at all.

Installation

Please make sure you have Python version 2.7.18(recommended) or greater installed on your system. You can install it from official python website: https://www.python.org/downloads/release/python-2718/

  • Install the memory-profiler using npm:
npm install @luvsharma1931/memory-profiler
  • The module has to be imported in the Node.js application code using a single line import statement.
var memoryProfiler = require("@luvsharma1931/memory-profiler");

How does this plug n play module works?

  • When the Node.js application gets started and comes to running state, the memory profiling also automatically starts running for this application and the module creates three files – memoryStats.txt, memoryLeak.txt, logs.txt at default system location – “C:\memory-profiler-logs\”.
  • The module writes heap memory usage data to the memoryStats.txt file at times just after a garbage collection is run automatically in the Node.js runtime environment.
  • If a memory leak is found by the module, it writes the leak information to memoryLeak.txt file. If any error occurs during the memory profiling process, the module logs the error message to logs.txt file.
  • The module logs an info message in the logs.txt file indicating that memory profiling started successfully.

alt text

alt text

Please feel free to provide your feedback and contribute to this project by creating a pull request. You can also reach me via email - [email protected]