dwebfs-network-speed

1.0.0 • Public • Published

dwebfs-network-speed

Travis npm

Get upload and download speeds for a dwebfs archive.

Usage

var archive = dwebfs('.dweb')
var swarm = dweb-discovery(archive)
var speed = networkSpeed(archive, {timeout: 1000})
 
setInterval(function () {
  console.log('upload speed: ', speed.uploadSpeed)
  console.log('download speed: ', speed.downloadSpeed)
}, 500)

API

var speed = networkSpeed(archive, [opts])

  • archive is a dwebfs archive.
  • opts.timeout is the only option. Speed will be reset to zero after the timeout.

speed.uploadSpeed

Archive upload speed across all peers.

speed.downloadSpeed

Archive download speed across all peers.

speed.downloadTotal

Archive total download.

speed.uploadTotal

Archive total upload.

License

MIT

/dwebfs-network-speed/

    Package Sidebar

    Install

    npm i dwebfs-network-speed

    Weekly Downloads

    1

    Version

    1.0.0

    License

    MIT

    Unpacked Size

    8.78 kB

    Total Files

    7

    Last publish

    Collaborators

    • shikhars3711