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 🙏

© 2025 – Pkg Stats / Ryan Hefner

mysql-weighted-network-visualization

v1.0.1

Published

> https://github.com/scaret/mysql-weighted-network-visualization

Downloads

8

Readme

Node MySQL Weighted Network Visualization

https://github.com/scaret/mysql-weighted-network-visualization

需求:

  1. 展示某个时间点的网络状况、有问题的节点、有问题的链路
  2. 节点有多个属性值(IP,机房、区域、国内外、角色)
  3. 节点间有一定的集群关系(机房、区域),而且有层级
  4. 节点的链路有多个属性(流量、丢包、延迟、抖动),且这些属性有不同的阈值
  5. 节点数量众多,可能需要按照属性屏蔽一些节点,或者按照属性进行聚合
  6. 输入值是有向的端到端链路的权

实现:

  1. 使用Vis.js http://visjs.org/network_examples.html
  2. 节点有一个自增ID,一个unique的name,一些 _prop<数字>__的属性,对出入的度有断言,对出入的度是否相等有断言。(一个网络接口是一个节点,同一台机器可能有多个网络节点。所以一台机器可能是几个节点的集群)
  3. 节点的集群划分是按照某一属性来的。集群之上不再有集群。如有需要,增加更多的冗余属性。
  4. 边和边的权分段输入。如一条链路分4段,则插入4条记录,分别描述4端点到点的情况。