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

speed-test-http-server

v0.0.1

Published

service that test terminal network speed by browser graphically, run any size.

Downloads

6

Readme

What's the service

Setup a website, or join a website using NodeJS connect module, when user access the web page, net rate testing is auto started, it will send back page data chunk by chunk, and at the end of every chunk transferred, the page will update rate statistics, including average network rate, last 1M transfer rate, accumulated total transferred data. All rate will expressed in MB/min, KB/sec, kb/s for convenience evaluation. Progress bar will advanced when more chunk was transferred.

You can test with any size (in MB), you can alway see the recent 1M transfer rate (that could stand for network rate in stable state).

Design

Firstly print the visible part of the testing page, and init all stat counters. It include a form, you can fill the size input and submit, that will change the test transfer size and rerun the test.

Secondly, run the loop, repeating write a chunk followed by a update call the update will update statistics numbers and advance the progress bar.

Finally, do final update and print body/html close tag.

Configuration & Deployment

Note: it is only for my own deployment work.

edit the setting.cfg

for default listening port, transfer chunk size, default transfer size

deploy to target server from my local macbook

rsync -av -C -e "ssh -p 60222" ~/dev/project/net-speed-test [email protected]:

run the service website

ssh -p [email protected] cd net-speed-test nohup forever net-speed-test.js > trace.log &

Socket Upload/Download Speed Test Service

上行

Server 每收到数据(和客户端的包划分不同),都将该数据大小和距离上次收到包的时间差(ms毫秒-千分之一秒)发给客户端。 发送格式为 (UInt32BE - size) - (UInt32BE - ms-delta) 共8个字节

下行

连接到 test server 后,server 不停的吐数据给客户端,客户端可以根据收到的数据的时间和大小得到下载速率, 客户端关闭写socket的信号到了 server 端后,server 停止吐数据。 客户端可以采用设置指定大小下载量到达后单向关闭连接或者由用户点停止后关闭单向连接。

上行下行合并服务

上行和下行共用一个服务端口, 如果服务端在接受到连接请求10ms内发送数据并被测速服务器接受到 则认为是上行测试, 否则认为是下行测试 测试地址为 60.29.143.50:1234