Skip to content

TheToolbox/node-fast-speed-test

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

A nice, simple speed test (with no dependencies!)

Measures how quickly you can pull files from the fast.com Netflix CDNs.

CLI usage

To install

$ npm install -g fast-speed-test

To use

$ speed-test
14581760 bytes/sec
113920 kbps
111.25 mbps

API usage

import getSpeed from 'fast-speed-test';

getSpeed()
  .then(speed => console.log(speed + ' bytes per second'));


// or to guarantee it returns in ~10 seconds
getSpeed(10)
  .then(speed => console.log(speed + ' bytes per second'));

Contributing

The implementation used is fairly naive. It runs 3 downloads at once, and stops once the first download completes. It counts the number of bytes transferred every 0.2s, and multiplies by 5. It does a moving average of the last 5 measurements to improve consistency. Improvements are heartily welcomed.

About

CLI and API for Fast.com speed tests

Resources

Stars

Watchers

Forks

Packages

No packages published