kenigbolo / network-speed Goto Github PK
View Code? Open in Web Editor NEWNode light weight module to check network speed (upload/download)
License: MIT License
Node light weight module to check network speed (upload/download)
License: MIT License
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;
Does this require node version 9.2? I see it's explicitly specified in the package.json -- any reason for that?
The host link for the function 'www.postcatcher.in' does not work correctly recently, is there any possible way to fix this problem?
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;
when clicking on the button in "react" it writes "URL is not a constructor"
https://codesandbox.io/s/patient-dust-do1d8?file=/src/App.js
I was able to fix this by removing 'http:'
const baseUrl = "//eu.httpbin.org/stream-bytes/50000000";
Do you have any development to use https?
I need to use https with a bearer token.
Sometimes the result is 0.15
and often it is Infinity
.
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 ()
Can anyone please guide how can I define my own endpoints either in node.js or asp.net.
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 :)
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.
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?
hey kenigbolo!
Your network-speed library is great!
but why the output of the data seems wrong.?
i tried to use different end point such as downloading http://www.fgroupindonesia.com/downloadable/bitplay.mp4
the real size in (bytes) 6,914,539
but the output wasn't that one. Any ideas how to solve it?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.