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 🙏

© 2026 – Pkg Stats / Ryan Hefner

mx-pm

v1.0.0

Published

node性能监控,捕获

Downloads

13

Readme

介绍

node 端性能监控模块,基于 node 与飞书机器人对项目 CPU,内存,监控可疑内存泄漏代码,全局错误捕获,及进程问题的捕获并推送至飞书; 模块为测试阶段(内部使用阶段),请勿下载使用,出现的任何问题,我们一概不负责,最终解释权归我们所有。

使用

💪 开启内存泄漏捕获

const { Memwatch } = require("m-share-npm");
new Memwatch().warning((stats, hd) => {});

💪 开启进程监控,捕获异常

const { ProcessWarn } = require("m-share-npm");

/* webHook为飞书机器人的webHook地址 */
const ProcessWarnClass = new ProcessWarn({ webHook });

ProcessWarnClass.global((err, origin) => {}); //开启全局异常捕获
ProcessWarnClass.unhandledRejection((reason, promise) => {}); //开启Promise异常捕获
ProcessWarnClass.warning((warning) => {}); //开启进程警告捕获

💪 开启性能监控(打印当前内存与 cpu 使用情况 (不建议在生产环境使用)

对内存使用率达到阀值进行报警,一般大于等于 90%就会触发 传入 true 则打印 cpu 使用情况,默认不打印

const { System } = require("m-share-npm");

/* webHook为飞书机器人的webHook地址 */
/* warnMemory为内存使用的阀值,单位为M,默认500M*/
new System({ webHook, warnMemory }).memoryWarning(true);

更新日志

v2.2.0:

  • 增加对内存泄漏捕获Memwatch
  • 优化对进程 cpu,内存使用情况监控的System
  • 对所有暴露出来的方法添加回调

v2.1.0:

  • 增加对异常捕获ProcessWarn
  • 增加对进程 cpu,内存使用情况监控的System

链接