max-mapper / websocket-stream

websockets with the node stream API
BSD 2-Clause "Simplified" License
668 stars 114 forks source link

[Question] How to measure bandwidth? #137

Open binarykitchen opened 6 years ago

binarykitchen commented 6 years ago

Has anyone an idea how one could measure the bandwidth when using websocket-stream? Like having a number after a short time, a getter or event that emits me the number.

Could come in very handy for collecting data, especially edge cases why a certain error has happened.

mcollina commented 6 years ago

Unfortunately no :/.

binarykitchen commented 6 years ago

Found an old implementation how to measure bandwidth in a stream: https://github.com/pmarques/node-stream-bandwidth/blob/master/index.js

Maybe can give us some ideas

binarykitchen commented 6 years ago

Or this one: https://github.com/bookchin/myspeed