Git Product home page Git Product logo

network-speed's People

Contributors

41y08h avatar dependabot-preview[bot] avatar dependabot-support avatar kenigbolo avatar mrf345 avatar okdistribute avatar sylchauf avatar tance77 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

network-speed's Issues

TypeError: URL is not a constructor

I receive this error while trying to run checkDownloadSpeed

My code:

const assetUrl = '...'
  const sizeInBytes = 8000;

  const speedInMb = (
    await new NetworkSpeed().checkDownloadSpeed(assetUrl, sizeInBytes)
  ).mbps;

Force Node 9.2?

Does this require node version 9.2? I see it's explicitly specified in the package.json -- any reason for that?

Unclear on filesize

Based on the example it looks like the baseURl is asking for 50,000,000 bytes while the given size looks like 500,000 is this right?

const baseUrl = 'http://eu.httpbin.org/stream-bytes/50000000';
  const fileSize = 500000;

Unable to catch error when internet is disconnected

Unable to catch error when internet connectivity is lost. just have some errors logged in console but error does not reach till the catch block.

request.js:150 GET https://diag.server.com/image.jpg?time=1672039932518 net::ERR_INTERNET_DISCONNECTED

request.js:150 Uncaught (in promise) TypeError: Failed to fetch
at push../node_modules/stream-http/lib/request.js.ClientRequest._onFinish (request.js:150:1)
at push../node_modules/stream-http/lib/request.js.module.exports. (request.js:62:1)
at push../node_modules/stream-http/lib/request.js.module.exports.emit (events.js:153:1)
at finishMaybe (_stream_writable.js:630:1)
at endWritable (_stream_writable.js:638:1)
at push../node_modules/readable-stream/lib/_stream_writable.js.Writable.end (_stream_writable.js:594:1)
at push../node_modules/stream-http/lib/request.js.ClientRequest.end (request.js:297:1)
at Object.get (index.js:44:1)
at push../node_modules/https-browserify/index.js.https.get (index.js:17:1)
at app.js:31:1
at new Promise ()
at NetworkSpeedCheck.checkDownloadSpeed (app.js:30:1)
at new Promise ()

download speed

when I check the download speed from this library (20mb) and compare it to speedTest(80mb) (for example) the changes was big. I used the link as you describe for the baseUrl.

another question is when I change the baseUrl to some img from my server I get blocked by CORS, how can I change the mode for 'no-cors'.

thnx :)

Speed Conversion

The speed conversions form bits/s to kbps to mbps uses a denominator of 1024.

This holds true for bytes to kbytes to mbytes but not for the former.

Denominators should be 1000.

check upload speed not using https

Upload speed using an https endpoint is not working because it's using the http module from node instead of https.

Can we get an option to specify which module to use?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.